GLib.File – gio-2.0 Reference Manual
Packages
gio-2.0
GLib
File
new_for_commandline_arg
new_for_path
new_for_uri
new_tmp
parse_name
@delete
append_to
append_to_async
copy
copy_async
copy_attributes
create
create_async
create_readwrite
create_readwrite_async
delete_async
dup
eject_mountable
eject_mountable_with_operation
enumerate_children
enumerate_children_async
equal
find_enclosing_mount
find_enclosing_mount_async
get_basename
get_child
get_child_for_display_name
get_parent
get_parse_name
get_path
get_relative_path
get_uri
get_uri_scheme
has_parent
has_prefix
has_uri_scheme
hash
is_native
load_contents
load_contents_async
load_partial_contents_async
make_directory
make_directory_with_parents
make_symbolic_link
monitor
monitor_directory
monitor_file
mount_enclosing_volume
mount_mountable
move
open_readwrite
open_readwrite_async
poll_mountable
prefix_matches
query_default_handler
query_exists
query_file_type
query_filesystem_info
query_filesystem_info_async
query_info
query_info_async
query_settable_attributes
query_writable_namespaces
read
read_async
read_fn
replace
replace_async
replace_contents
replace_contents_async
replace_readwrite
replace_readwrite_async
resolve_relative_path
set_attribute
set_attribute_byte_string
set_attribute_int32
set_attribute_int64
set_attribute_string
set_attribute_uint32
set_attribute_uint64
set_attributes_async
set_attributes_from_info
set_display_name
set_display_name_async
start_mountable
stop_mountable
supports_thread_contexts
trash
unmount_mountable
unmount_mountable_with_operation
File
Object Hierarchy:
Description:
public
interface
File
:
Object
Namespace:
GLib
Package:
gio-2.0
Content:
Static methods:
public
static
File
new_for_commandline_arg
(
string
arg)
public
static
File
new_for_path
(
string
path)
public
static
File
new_for_uri
(
string
uri)
public
static
File
new_tmp
(
string
? tmpl,
out
FileIOStream
iostream)
throws
Error
public
static
File
parse_name
(
string
parse_name)
Methods:
public
abstract
FileOutputStream
append_to
(
FileCreateFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileOutputStream
append_to_async
(
FileCreateFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
copy
(
File
destination,
FileCopyFlags
flags,
Cancellable
? cancellable =
null
,
FileProgressCallback
? progress_callback =
null
)
throws
Error
public
abstract
async
bool
copy_async
(
File
destination,
FileCopyFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
,
FileProgressCallback
? progress_callback =
null
)
throws
Error
public
bool
copy_attributes
(
File
destination,
FileCopyFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileOutputStream
create
(
FileCreateFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileOutputStream
create_async
(
FileCreateFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileIOStream
create_readwrite
(
FileCreateFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileIOStream
create_readwrite_async
(
FileCreateFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
@delete
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
delete_async
(
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
File
dup
()
public
abstract
async
bool
eject_mountable
(
MountUnmountFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
eject_mountable_with_operation
(
MountUnmountFlags
flags,
MountOperation
? mount_operation,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileEnumerator
enumerate_children
(
string
attributes,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileEnumerator
enumerate_children_async
(
string
attributes,
FileQueryInfoFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
equal
(
File
file2)
public
abstract
Mount
find_enclosing_mount
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
Mount
find_enclosing_mount_async
(
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
string
?
get_basename
()
public
File
get_child
(
string
name)
public
abstract
File
get_child_for_display_name
(
string
display_name)
throws
Error
public
abstract
File
?
get_parent
()
public
abstract
string
get_parse_name
()
public
abstract
string
?
get_path
()
public
abstract
string
?
get_relative_path
(
File
descendant)
public
abstract
string
get_uri
()
public
abstract
string
get_uri_scheme
()
public
bool
has_parent
(
File
? parent)
public
abstract
bool
has_prefix
(
File
file)
public
abstract
bool
has_uri_scheme
(
string
uri_scheme)
public
abstract
uint
hash
()
public
abstract
bool
is_native
()
public
bool
load_contents
(
Cancellable
? cancellable =
null
,
out
uint8
[] contents,
out
string
etag_out)
throws
Error
public
async
bool
load_contents_async
(
Cancellable
? cancellable =
null
,
out
uint8
[] contents,
out
string
etag_out)
throws
Error
public
async
bool
load_partial_contents_async
(
Cancellable
? cancellable =
null
,
FileReadMoreCallback
read_more_callback,
out
uint8
[] contents,
out
string
etag_out)
throws
Error
public
abstract
bool
make_directory
(
Cancellable
? cancellable =
null
)
throws
Error
public
bool
make_directory_with_parents
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
make_symbolic_link
(
string
symlink_value,
Cancellable
? cancellable =
null
)
throws
Error
public
FileMonitor
monitor
(
FileMonitorFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileMonitor
monitor_directory
(
FileMonitorFlags
flags,
Cancellable
? cancellable =
null
)
throws
IOError
public
abstract
FileMonitor
monitor_file
(
FileMonitorFlags
flags,
Cancellable
? cancellable =
null
)
throws
IOError
public
abstract
async
bool
mount_enclosing_volume
(
MountMountFlags
flags,
MountOperation
? mount_operation,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
File
mount_mountable
(
MountMountFlags
flags,
MountOperation
? mount_operation,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
move
(
File
destination,
FileCopyFlags
flags,
Cancellable
? cancellable =
null
,
FileProgressCallback
? progress_callback =
null
)
throws
Error
public
abstract
FileIOStream
open_readwrite
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileIOStream
open_readwrite_async
(
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
poll_mountable
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
bool
prefix_matches
(
File
file)
public
AppInfo
query_default_handler
(
Cancellable
? cancellable =
null
)
throws
Error
public
bool
query_exists
(
Cancellable
? cancellable =
null
)
public
FileType
query_file_type
(
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
public
abstract
FileInfo
query_filesystem_info
(
string
attributes,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileInfo
query_filesystem_info_async
(
string
attributes,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileInfo
query_info
(
string
attributes,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileInfo
query_info_async
(
string
attributes,
FileQueryInfoFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileAttributeInfoList
query_settable_attributes
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileAttributeInfoList
query_writable_namespaces
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileInputStream
read
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileInputStream
read_async
(
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
weak
FileInputStream
read_fn
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
FileOutputStream
replace
(
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileOutputStream
replace_async
(
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
replace_contents
(
uint8
[] contents,
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
out
string
new_etag,
Cancellable
? cancellable =
null
)
throws
Error
public
async
bool
replace_contents_async
(
uint8
[] contents,
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
Cancellable
? cancellable =
null
,
out
string
new_etag)
throws
Error
public
abstract
FileIOStream
replace_readwrite
(
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
FileIOStream
replace_readwrite_async
(
string
? etag,
bool
make_backup,
FileCreateFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
File
resolve_relative_path
(
string
relative_path)
public
abstract
bool
set_attribute
(
string
attribute,
FileAttributeType
type,
void
* value_p,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_byte_string
(
string
attribute,
string
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_int32
(
string
attribute,
int32
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_int64
(
string
attribute,
int64
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_string
(
string
attribute,
string
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_uint32
(
string
attribute,
uint32
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
set_attribute_uint64
(
string
attribute,
uint64
value,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
set_attributes_async
(
FileInfo
info,
FileQueryInfoFlags
flags,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
,
out
FileInfo
info_out)
throws
Error
public
abstract
bool
set_attributes_from_info
(
FileInfo
info,
FileQueryInfoFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
File
set_display_name
(
string
display_name,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
File
set_display_name_async
(
string
display_name,
int
io_priority =
DEFAULT
,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
start_mountable
(
DriveStartFlags
flags,
MountOperation
? start_operation,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
stop_mountable
(
MountUnmountFlags
flags,
MountOperation
? mount_operation,
Cancellable
? cancellable =
null
)
throws
Error
public
bool
supports_thread_contexts
()
public
abstract
bool
trash
(
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
unmount_mountable
(
MountUnmountFlags
flags,
Cancellable
? cancellable =
null
)
throws
Error
public
abstract
async
bool
unmount_mountable_with_operation
(
MountUnmountFlags
flags,
MountOperation
? mount_operation,
Cancellable
? cancellable =
null
)
throws
Error
Inherited Members:
All known members inherited from class GLib.Object
@new
newv
new_valist
get_type
get_class
@ref
unref
ref_sink
weak_ref
weak_unref
add_weak_pointer
remove_weak_pointer
@get
@set
get_property
set_property
get_data
set_data
set_data_full
steal_data
get_qdata
set_qdata
set_qdata_full
steal_qdata
freeze_notify
thaw_notify
dispose
constructed
notify_property
connect
disconnect
add_toggle_ref
remove_toggle_ref
bind_property
notify
ref_count