Import line: | Gio = imports.gi.Gio; |
GIR File: | Gio-2.0.gir |
C documentation: | GFile |
Interface : | File |
None |
Method / Constructor | Defined By | |
---|---|---|
Gets an output stream for appending data to the file.
Gets an output stream for appending data to the file. If
the file doesn't already exist it is created. By default files created are generally readable by everyone, but if you pass G_FILE_CREATE_PRIVATE in flags the file will be made readable only to the current user, to the level that is supported on the target filesystem. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Some file systems don't allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Free the returned object with g_object_unref().
|
Gio.File | |
append_to_async
(FileCreateFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously opens file for appending.
Asynchronously opens file for appending.
For more details, see g_file_append_to() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_append_to_finish() to get the result of the operation.
|
Gio.File | |
append_to_finish
(AsyncResult res)
:
Gio.FileOutputStream
Finishes an asynchronous file append operation started with
g_file_append_to_async().
Finishes an asynchronous file append operation started with
g_file_append_to_async(). Free the returned object with g_object_unref().
|
Gio.File | |
copy
(File destination, FileCopyFlags flags, Cancellable cancellable, Function progress_callback, void* progress_callback_data)
:
gboolean
Copies the file source to the location specified by destination.
Copies the file source to the location specified by destination.
Can not handle recursive copies of directories. If the flag G_FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten. If the flag G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied as symlinks, otherwise the target of the If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If progress_callback is not NULL, then the operation can be monitored by setting this to a GFileProgressCallback function. progress_callback_data will be passed to this function. It is guaranteed that this callback will be called after all data has been transferred with the total number of bytes copied during the operation. If the source file does not exist then the G_IO_ERROR_NOT_FOUND error is returned, independent on the status of the destination. If G_FILE_COPY_OVERWRITE is not specified and the target exists, then the error G_IO_ERROR_EXISTS is returned. If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY error is returned. If trying to overwrite a directory with a directory the G_IO_ERROR_WOULD_MERGE error is returned. If the source is a directory and the target does not exist, or G_FILE_COPY_OVERWRITE is specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error is returned. If you are interested in copying the GFile object itself (not the on-disk file), see g_file_dup().
|
Gio.File | |
Copies the file attributes from source to destination.
Copies the file attributes from source to destination.
Normally only a subset of the file attributes are copied, those that are copies in a normal file copy operation (which for instance does not include e.g. owner). However if G_FILE_COPY_ALL_METADATA is specified in flags, then all the metadata that is possible to copy is copied. This is useful when implementing move by copy + delete source.
|
Gio.File | |
copy_finish
(AsyncResult res)
:
gboolean
Finishes copying the file started with
g_file_copy_async().
Finishes copying the file started with
g_file_copy_async().
|
Gio.File | |
Creates a new file and returns an output stream for writing to it.
Creates a new file and returns an output stream for writing to it.
The file must not already exist. By default files created are generally readable by everyone, but if you pass G_FILE_CREATE_PRIVATE in flags the file will be made readable only to the current user, to the level that is supported on the target filesystem. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If a file or directory with this name already exists the G_IO_ERROR_EXISTS error will be returned. Some file systems don't allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME error, and if the name is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. NULL on error. Free the returned object with g_object_unref().
|
Gio.File | |
create_async
(FileCreateFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously creates a new file and returns an output stream for writing to it.
Asynchronously creates a new file and returns an output stream for writing to it.
The file must not already exist. For more details, see g_file_create() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_create_finish() to get the result of the operation.
|
Gio.File | |
create_finish
(AsyncResult res)
:
Gio.FileOutputStream
Finishes an asynchronous file create operation started with
g_file_create_async().
Finishes an asynchronous file create operation started with
g_file_create_async(). Free the returned object with g_object_unref().
|
Gio.File | |
Creates a new file and returns a stream for reading and writing to it.
Creates a new file and returns a stream for reading and writing to it.
The file must not already exist. By default files created are generally readable by everyone, but if you pass G_FILE_CREATE_PRIVATE in flags the file will be made readable only to the current user, to the level that is supported on the target filesystem. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If a file or directory with this name already exists the G_IO_ERROR_EXISTS error will be returned. Some file systems don't allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME error, and if the name is too long, G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Free the returned object with g_object_unref().
|
Gio.File | |
create_readwrite_async
(FileCreateFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously creates a new file and returns a stream for reading and
writing to it.
Asynchronously creates a new file and returns a stream for reading and
writing to it. The file must not already exist. For more details, see g_file_create_readwrite() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_create_readwrite_finish() to get the result of the operation.
|
Gio.File | |
create_readwrite_finish
(AsyncResult res)
:
Gio.FileIOStream
Finishes an asynchronous file create operation started with
g_file_create_readwrite_async().
Finishes an asynchronous file create operation started with
g_file_create_readwrite_async(). Free the returned object with g_object_unref().
|
Gio.File | |
delete
(Cancellable cancellable)
:
gboolean
Deletes a file.
Deletes a file. If the file is a directory, it will only be deleted if it
is empty. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
dup
()
:
Gio.File
Duplicates a GFile handle.
Duplicates a GFile handle. This operation does not duplicate
the actual file or directory represented by the GFile; see g_file_copy() if attempting to copy a file. This call does no blocking i/o.
|
Gio.File | |
eject_mountable
(MountUnmountFlags flags, Cancellable cancellable, Function callback, void* user_data)
:
none
Starts an asynchronous eject on a mountable.
Starts an asynchronous eject on a mountable.
When this operation has completed, callback will be called with g_file_eject_mountable_finish(). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
eject_mountable_finish
(AsyncResult result)
:
gboolean
Finishes an asynchronous eject operation started by
g_file_eject_mountable().
Finishes an asynchronous eject operation started by
g_file_eject_mountable(). otherwise.
|
Gio.File | |
eject_mountable_with_operation
(MountUnmountFlags flags, MountOperation mount_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Starts an asynchronous eject on a mountable.
Starts an asynchronous eject on a mountable.
When this operation has completed, callback will be called with g_file_eject_mountable_with_operation_finish(). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
eject_mountable_with_operation_finish
(AsyncResult result)
:
gboolean
Finishes an asynchronous eject operation started by
g_file_eject_mountable_with_operation().
Finishes an asynchronous eject operation started by
g_file_eject_mountable_with_operation(). otherwise.
|
Gio.File | |
enumerate_children
(String attributes, FileQueryInfoFlags flags, Cancellable cancellable)
:
Gio.FileEnumerator
Gets the requested information about the files in a directory.
Gets the requested information about the files in a directory. The result
is a GFileEnumerator object that will give out GFileInfo objects for all the files in the directory. The attributes value is a string that specifies the file attributes that should be gathered. It is not an error if it's not possible to read a particular requested attribute from a file - it just won't be set. attributes should be a comma-separated list of attributes or attribute wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all attributes in the standard namespace. An example attribute query be "standard::*,owner::user". The standard attributes are available as defines, like G_FILE_ATTRIBUTE_STANDARD_NAME. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned. If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned. Other errors are possible too. Free the returned object with g_object_unref().
|
Gio.File | |
enumerate_children_async
(String attributes, FileQueryInfoFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously gets the requested information about the files in a directory.
Asynchronously gets the requested information about the files in a directory. The result
is a GFileEnumerator object that will give out GFileInfo objects for all the files in the directory. For more details, see g_file_enumerate_children() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_enumerate_children_finish() to get the result of the operation.
|
Gio.File | |
enumerate_children_finish
(AsyncResult res)
:
Gio.FileEnumerator
Finishes an async enumerate children operation.
Finishes an async enumerate children operation.
See g_file_enumerate_children_async(). Free the returned object with g_object_unref().
|
Gio.File | |
Checks equality of two given GFiles.
Checks equality of two given GFiles. Note that two
GFiles that differ can still refer to the same file on the filesystem due to various forms of filename aliasing. This call does no blocking i/o. FALSE if either is not a GFile.
|
Gio.File | |
find_enclosing_mount
(Cancellable cancellable)
:
Gio.Mount
Gets a GMount for the GFile.
Gets a GMount for the GFile.
If the GFileIface for file does not have a mount (e.g. possibly a remote share), error will be set to G_IO_ERROR_NOT_FOUND and NULL will be returned. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Free the returned object with g_object_unref().
|
Gio.File | |
find_enclosing_mount_async
(gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously gets the mount for the file.
Asynchronously gets the mount for the file.
For more details, see g_file_find_enclosing_mount() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_find_enclosing_mount_finish() to get the result of the operation.
|
Gio.File | |
find_enclosing_mount_finish
(AsyncResult res)
:
Gio.Mount
Finishes an asynchronous find mount request.
Finishes an asynchronous find mount request.
See g_file_find_enclosing_mount_async(). Free the returned object with g_object_unref().
|
Gio.File | |
get_basename
()
:
String
Gets the base name (the last component of the path) for a given GFile.
Gets the base name (the last component of the path) for a given GFile.
If called for the top level of a system (such as the filesystem root or a uri like sftp://host/) it will return a single directory separator (and on Windows, possibly a drive letter). The base name is a byte string (*not* UTF-8). It has no defined encoding or rules other than it may not contain zero bytes. If you want to use filenames in a user interface you should use the display name that you can get by requesting the G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info(). This call does no blocking i/o. if given GFile is invalid. The returned string should be freed with g_free() when no longer needed.
|
Gio.File | |
Gets a child of file with basename equal to name.
Gets a child of file with basename equal to name.
Note that the file with that specific name might not exist, but you can still have a GFile that points to it. You can use this for instance to create that file. This call does no blocking i/o. Free the returned object with g_object_unref().
|
Gio.File | |
Gets the child of file for a given display_name (i.e.
Gets the child of file for a given display_name (i.e. a UTF8
version of the name). If this function fails, it returns NULL and error will be set. This is very useful when constructing a GFile for a new file and the user entered the filename in the user interface, for instance when you select a directory and type a filename in the file selector. This call does no blocking i/o. NULL if the display name couldn't be converted. Free the returned object with g_object_unref().
|
Gio.File | |
get_parent
()
:
Gio.File
Gets the parent directory for the file.
Gets the parent directory for the file.
If the file represents the root directory of the file system, then NULL will be returned. This call does no blocking i/o. GFile or NULL if there is no parent. Free the returned object with g_object_unref().
|
Gio.File | |
get_parse_name
()
:
String
Gets the parse name of the file.
Gets the parse name of the file.
A parse name is a UTF-8 string that describes the file such that one can get the GFile back using g_file_parse_name(). This is generally used to show the GFile as a nice full-pathname kind of string in a user interface, like in a location entry. For local files with names that can safely be converted to UTF8 the pathname is used, otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped). This call does no blocking i/o. string should be freed with g_free() when no longer needed.
|
Gio.File | |
get_path
()
:
String
Gets the local pathname for GFile, if one exists.
Gets the local pathname for GFile, if one exists.
This call does no blocking i/o. no such path exists. The returned string should be freed with g_free() when no longer needed.
|
Gio.File | |
Gets the path for descendant relative to parent.
Gets the path for descendant relative to parent.
This call does no blocking i/o. to parent, or NULL if descendant doesn't have parent as prefix. The returned string should be freed with g_free() when no longer needed.
|
Gio.File | |
get_uri
()
:
String
Gets the URI for the file.
Gets the URI for the file.
This call does no blocking i/o. The returned string should be freed with g_free() when no longer needed.
|
Gio.File | |
get_uri_scheme
()
:
String
Gets the URI scheme for a GFile.
Gets the URI scheme for a GFile.
RFC 3986 decodes the scheme as: URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] Common schemes include "file", "http", "ftp", etc. This call does no blocking i/o. GFile. The returned string should be freed with g_free() when no longer needed.
|
Gio.File | |
Checks if file has a parent, and optionally, if it is parent.
Checks if file has a parent, and optionally, if it is parent.
If parent is NULL then this function returns TRUE if file has any parent at all. If parent is non-NULL then TRUE is only returned if file is a child of parent. case that parent is NULL).
|
Gio.File | |
Checks whether file has the prefix specified by prefix.
Checks whether file has the prefix specified by prefix. In other word,
if the names of inital elements of files pathname match prefix. Only full pathname elements are matched, so a path like /foo is not considered a prefix of /foobar, only of /foo/bar. This call does no i/o, as it works purely on names. As such it can sometimes return FALSE even if file is inside a prefix (from a filesystem point of view), because the prefix of file is an alias of prefix. FALSE otherwise.
|
Gio.File | |
Checks to see if a GFile has a given URI scheme.
|
Gio.File | |
icon_new
()
:
Gio.Icon
Creates a new icon for a file.
Creates a new icon for a file.
|
Gio.File | |
is_native
()
:
gboolean
Checks to see if a file is native to the platform.
Checks to see if a file is native to the platform.
A native file s one expressed in the platform-native filename format, e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it might be on a locally mounted remote filesystem. On some systems non-native files may be available using the native filesystem via a userspace filesystem (FUSE), in these cases this call will return FALSE, but g_file_get_path() will still return a native path. This call does no blocking i/o.
|
Gio.File | |
Loads the content of the file into memory.
Loads the content of the file into memory. The data is always
zero-terminated, but this is not included in the resultant length. The returned content should be freed with g_free() when no longer needed. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. FALSE if there were errors.
|
Gio.File | |
Starts an asynchronous load of the file's contents.
Starts an asynchronous load of the file's contents.
For more details, see g_file_load_contents() which is the synchronous version of this call. When the load operation has completed, callback will be called with user data. To finish the operation, call g_file_load_contents_finish() with the GAsyncResult returned by the callback. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
Finishes an asynchronous load of the file's contents.
Finishes an asynchronous load of the file's contents.
The contents are placed in contents, and length is set to the size of the contents string. The content should be freed with g_free() when no longer needed. If etag_out is present, it will be set to the new entity tag for the file. present, it will be set appropriately.
|
Gio.File | |
Finishes an asynchronous partial load operation that was started
with g_file_load_partial_contents_async().
Finishes an asynchronous partial load operation that was started
with g_file_load_partial_contents_async(). The data is always zero-terminated, but this is not included in the resultant length. The returned content should be freed with g_free() when no longer needed. present, it will be set appropriately.
|
Gio.File | |
make_directory
(Cancellable cancellable)
:
gboolean
Creates a directory.
Creates a directory. Note that this will only create a child directory of
the immediate parent directory of the path or URI given by the GFile. To recursively create directories, see g_file_make_directory_with_parents(). This function will fail if the parent directory does not exist, setting directories, this function will fail, setting error to G_IO_ERROR_NOT_SUPPORTED. For a local GFile the newly created directory will have the default (current) ownership and permissions of the current process. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
make_directory_with_parents
(Cancellable cancellable)
:
gboolean
Creates a directory and any parent directories that may not exist similar to
'mkdir -p'.
Creates a directory and any parent directories that may not exist similar to
'mkdir -p'. If the file system does not support creating directories, this function will fail, setting error to G_IO_ERROR_NOT_SUPPORTED. For a local GFile the newly created directories will have the default (current) ownership and permissions of the current process. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. otherwise.
|
Gio.File | |
Creates a symbolic link named file which contains the string
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread.
Creates a symbolic link named file which contains the string
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
Obtains a file or directory monitor for the given file, depending
on the type of the file.
Obtains a file or directory monitor for the given file, depending
on the type of the file. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Free the returned object with g_object_unref().
|
Gio.File | |
Obtains a directory monitor for the given file.
Obtains a directory monitor for the given file.
This may fail if directory monitoring is not supported. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Free the returned object with g_object_unref().
|
Gio.File | |
Obtains a file monitor for the given file.
Obtains a file monitor for the given file. If no file notification
mechanism exists, then regular polling of the file is used. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. Free the returned object with g_object_unref().
|
Gio.File | |
mount_enclosing_volume
(MountMountFlags flags, MountOperation mount_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Starts a mount_operation, mounting the volume that contains the file location.
Starts a mount_operation, mounting the volume that contains the file location.
When this operation has completed, callback will be called with g_file_mount_enclosing_volume_finish(). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
mount_enclosing_volume_finish
(AsyncResult result)
:
gboolean
Finishes a mount operation started by g_file_mount_enclosing_volume().
Finishes a mount operation started by g_file_mount_enclosing_volume().
has occurred, this function will return FALSE and set error appropriately if present.
|
Gio.File | |
mount_mountable
(MountMountFlags flags, MountOperation mount_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Mounts a file of type G_FILE_TYPE_MOUNTABLE.
Mounts a file of type G_FILE_TYPE_MOUNTABLE.
Using mount_operation, you can request callbacks when, for instance, passwords are needed during authentication. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation.
|
Gio.File | |
mount_mountable_finish
(AsyncResult result)
:
Gio.File
Finishes a mount operation.
Finishes a mount operation. See g_file_mount_mountable() for details.
Finish an asynchronous mount operation that was started with g_file_mount_mountable(). Free the returned object with g_object_unref().
|
Gio.File | |
move
(File destination, FileCopyFlags flags, Cancellable cancellable, Function progress_callback, void* progress_callback_data)
:
gboolean
Tries to move the file or directory source to the location specified by destination.
Tries to move the file or directory source to the location specified by destination.
If native move operations are supported then this is used, otherwise a copy + delete fallback is used. The native implementation may support moving directories (for instance on moves inside the same filesystem), but the fallback code does not. If the flag G_FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten. If the flag G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied as symlinks, otherwise the target of the If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If progress_callback is not NULL, then the operation can be monitored by setting this to a GFileProgressCallback function. progress_callback_data will be passed to this function. It is guaranteed that this callback will be called after all data has been transferred with the total number of bytes copied during the operation. If the source file does not exist then the G_IO_ERROR_NOT_FOUND error is returned, independent on the status of the destination. If G_FILE_COPY_OVERWRITE is not specified and the target exists, then the error G_IO_ERROR_EXISTS is returned. If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY error is returned. If trying to overwrite a directory with a directory the G_IO_ERROR_WOULD_MERGE error is returned. If the source is a directory and the target does not exist, or G_FILE_COPY_OVERWRITE is specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error may be returned (if the native move operation isn't available).
|
Gio.File | |
open_readwrite
(Cancellable cancellable)
:
Gio.FileIOStream
Opens an existing file for reading and writing.
Opens an existing file for reading and writing. The result is
a GFileIOStream that can be used to read and write the contents of the file. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned. If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Free the returned object with g_object_unref().
|
Gio.File | |
open_readwrite_async
(gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously opens file for reading and writing.
Asynchronously opens file for reading and writing.
For more details, see g_file_open_readwrite() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_open_readwrite_finish() to get the result of the operation.
|
Gio.File | |
open_readwrite_finish
(AsyncResult res)
:
Gio.FileIOStream
Finishes an asynchronous file read operation started with
g_file_open_readwrite_async().
Finishes an asynchronous file read operation started with
g_file_open_readwrite_async(). Free the returned object with g_object_unref().
|
Gio.File | |
Polls a file of type G_FILE_TYPE_MOUNTABLE.
Polls a file of type G_FILE_TYPE_MOUNTABLE.
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation.
|
Gio.File | |
poll_mountable_finish
(AsyncResult result)
:
gboolean
Finishes a poll operation.
Finishes a poll operation. See g_file_poll_mountable() for details.
Finish an asynchronous poll operation that was polled with g_file_poll_mountable(). otherwise.
|
Gio.File | |
query_default_handler
(Cancellable cancellable)
:
Gio.AppInfo
Returns the GAppInfo that is registered as the default
application to handle the file specified by file.
Returns the GAppInfo that is registered as the default
application to handle the file specified by file. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When you are done with it, release it with g_object_unref()
|
Gio.File | |
query_exists
(Cancellable cancellable)
:
gboolean
Utility function to check if a particular file exists.
Utility function to check if a particular file exists. This is
implemented using g_file_query_info() and as such does blocking I/O. Note that in many cases it is racy to first check for file existence and then execute something based on the outcome of that, because the file might have been created or removed in between the operations. The general approach to handling that is to not check, but just do the operation and handle the errors as they come. As an example of race-free checking, take the case of reading a file, and can both result in two processes creating the file (with perhaps a partially written file as the result). The correct approach is to always try to create the file with g_file_create() which will either atomically create the file or fail with a G_IO_ERROR_EXISTS error. However, in many cases an existence check is useful in a user interface, for instance to make a menu item sensitive/insensitive, so that you don't have to fool users that something is possible and then just show and error dialog. If you do this, you should make sure to also handle the errors that can happen due to races when you execute the operation.
|
Gio.File | |
Utility function to inspect the GFileType of a file.
Utility function to inspect the GFileType of a file. This is
implemented using g_file_query_info() and as such does blocking I/O. The primary use case of this method is to check if a file is a regular file, directory, or symlink. does not exist
|
Gio.File | |
Similar to g_file_query_info(), but obtains information
about the filesystem the file is on, rather than the file itself.
Similar to g_file_query_info(), but obtains information
about the filesystem the file is on, rather than the file itself. For instance the amount of space available and the type of the filesystem. The attributes value is a string that specifies the file attributes that should be gathered. It is not an error if it's not possible to read a particular requested attribute from a file - it just won't be set. attributes should be a comma-separated list of attributes or attribute wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes of interest are G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes), G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Free the returned object with g_object_unref().
|
Gio.File | |
query_filesystem_info_async
(String attributes, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously gets the requested information about the filesystem
that the specified file is on.
Asynchronously gets the requested information about the filesystem
that the specified file is on. The result is a GFileInfo object that contains key-value attributes (such as type or size for the file). For more details, see g_file_query_filesystem_info() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_query_info_finish() to get the result of the operation.
|
Gio.File | |
query_filesystem_info_finish
(AsyncResult res)
:
Gio.FileInfo
Finishes an asynchronous filesystem info query.
Finishes an asynchronous filesystem info query. See
g_file_query_filesystem_info_async(). Free the returned object with g_object_unref().
|
Gio.File | |
Gets the requested information about specified file.
Gets the requested information about specified file. The result
is a GFileInfo object that contains key-value attributes (such as the type or size of the file). The attributes value is a string that specifies the file attributes that should be gathered. It is not an error if it's not possible to read a particular requested attribute from a file - it just won't be set. attributes should be a comma-separated list of attributes or attribute wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all attributes in the standard namespace. An example attribute query be "standard::*,owner::user". The standard attributes are available as defines, like G_FILE_ATTRIBUTE_STANDARD_NAME. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. For symlinks, normally the information about the target of the symlink is returned, rather than information about the symlink itself. However if you pass G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about the symlink itself will be returned. Also, for symlinks that point to non-existing files the information about the symlink itself will be returned. If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Free the returned object with g_object_unref().
|
Gio.File | |
query_info_async
(String attributes, FileQueryInfoFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously gets the requested information about specified file.
Asynchronously gets the requested information about specified file. The result
is a GFileInfo object that contains key-value attributes (such as type or size for the file). For more details, see g_file_query_info() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_query_info_finish() to get the result of the operation.
|
Gio.File | |
query_info_finish
(AsyncResult res)
:
Gio.FileInfo
Finishes an asynchronous file info query.
Finishes an asynchronous file info query.
See g_file_query_info_async(). Free the returned object with g_object_unref().
|
Gio.File | |
query_settable_attributes
(Cancellable cancellable)
:
Gio.FileAttributeInfoList
Obtain the list of settable attributes for the file.
Obtain the list of settable attributes for the file.
Returns the type and full attribute name of all the attributes that can be set on this file. This doesn't mean setting it will always succeed though, you might get an access failure, or some specific file may not support a specific attribute. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When you are done with it, release it with g_file_attribute_info_list_unref()
|
Gio.File | |
query_writable_namespaces
(Cancellable cancellable)
:
Gio.FileAttributeInfoList
Obtain the list of attribute namespaces where new attributes
can be created by a user.
Obtain the list of attribute namespaces where new attributes
can be created by a user. An example of this is extended attributes (in the "xattr" namespace). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When you are done with it, release it with g_file_attribute_info_list_unref()
|
Gio.File | |
read
(Cancellable cancellable)
:
Gio.FileInputStream
Opens a file for reading.
Opens a file for reading. The result is a GFileInputStream that
can be used to read the contents of the file. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned. If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Free the returned object with g_object_unref().
|
Gio.File | |
Asynchronously opens file for reading.
Asynchronously opens file for reading.
For more details, see g_file_read() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_read_finish() to get the result of the operation.
|
Gio.File | |
read_finish
(AsyncResult res)
:
Gio.FileInputStream
Finishes an asynchronous file read operation started with
g_file_read_async().
Finishes an asynchronous file read operation started with
g_file_read_async(). Free the returned object with g_object_unref().
|
Gio.File | |
replace
(String etag, gboolean make_backup, FileCreateFlags flags, Cancellable cancellable)
:
Gio.FileOutputStream
Returns an output stream for overwriting the file, possibly
creating a backup copy of the file first.
Returns an output stream for overwriting the file, possibly
creating a backup copy of the file first. If the file doesn't exist, it will be created. This will try to replace the file in the safest way possible so that any errors during the writing will not affect an already existing copy of the file. For instance, for local files it may write to a temporary file and then atomically rename over the destination when the stream is closed. By default files created are generally readable by everyone, but if you pass G_FILE_CREATE_PRIVATE in flags the file will be made readable only to the current user, to the level that is supported on the target filesystem. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If you pass in a non-NULL etag value, then this value is compared to the current entity tag of the file, and if they differ an G_IO_ERROR_WRONG_ETAG error is returned. This generally means that the file has been changed since you last read it. You can get the new etag from g_file_output_stream_get_etag() after you've finished writing and closed the GFileOutputStream. When you load a new file you can use g_file_input_stream_query_info() to get the etag of the file. If make_backup is TRUE, this function will attempt to make a backup of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you want to replace anyway, try again with If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned, and if the file is some other form of non-regular file then a G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some file systems don't allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME error, and if the name is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. Free the returned object with g_object_unref().
|
Gio.File | |
replace_async
(String etag, gboolean make_backup, FileCreateFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously overwrites the file, replacing the contents, possibly
creating a backup copy of the file first.
Asynchronously overwrites the file, replacing the contents, possibly
creating a backup copy of the file first. For more details, see g_file_replace() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_replace_finish() to get the result of the operation.
|
Gio.File | |
replace_contents
(String contents, guint32 length, String etag, gboolean make_backup, FileCreateFlags flags, Object out_values, Cancellable cancellable)
:
gboolean
Replaces the contents of file with contents of length bytes.
Replaces the contents of file with contents of length bytes.
If etag is specified (not NULL) any existing file must have that etag, or the error G_IO_ERROR_WRONG_ETAG will be returned. If make_backup is TRUE, this function will attempt to make a backup of file. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. The returned new_etag can be used to verify that the file hasn't changed the next time it is saved over. has occurred, this function will return FALSE and set error appropriately if present.
|
Gio.File | |
replace_contents_async
(String contents, guint32 length, String etag, gboolean make_backup, FileCreateFlags flags, Cancellable cancellable, Function callback, void* user_data)
:
none
Starts an asynchronous replacement of file with the given
current entity tag.
Starts an asynchronous replacement of file with the given
current entity tag. When this operation has completed, callback will be called with g_file_replace_contents_finish(). If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If make_backup is TRUE, this function will attempt to make a backup of file.
|
Gio.File | |
Finishes an asynchronous replace of the given file.
Finishes an asynchronous replace of the given file. See
g_file_replace_contents_async(). Sets new_etag to the new entity tag for the document, if present.
|
Gio.File | |
replace_finish
(AsyncResult res)
:
Gio.FileOutputStream
Finishes an asynchronous file replace operation started with
g_file_replace_async().
Finishes an asynchronous file replace operation started with
g_file_replace_async(). Free the returned object with g_object_unref().
|
Gio.File | |
replace_readwrite
(String etag, gboolean make_backup, FileCreateFlags flags, Cancellable cancellable)
:
Gio.FileIOStream
Returns an output stream for overwriting the file in readwrite mode,
possibly creating a backup copy of the file first.
Returns an output stream for overwriting the file in readwrite mode,
possibly creating a backup copy of the file first. If the file doesn't exist, it will be created. For details about the behaviour, see g_file_replace() which does the same thing but returns an output stream only. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. Free the returned object with g_object_unref().
|
Gio.File | |
replace_readwrite_async
(String etag, gboolean make_backup, FileCreateFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously overwrites the file in read-write mode, replacing the
contents, possibly creating a backup copy of the file first.
Asynchronously overwrites the file in read-write mode, replacing the
contents, possibly creating a backup copy of the file first. For more details, see g_file_replace_readwrite() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_replace_readwrite_finish() to get the result of the operation.
|
Gio.File | |
replace_readwrite_finish
(AsyncResult res)
:
Gio.FileIOStream
Finishes an asynchronous file replace operation started with
g_file_replace_readwrite_async().
Finishes an asynchronous file replace operation started with
g_file_replace_readwrite_async(). Free the returned object with g_object_unref().
|
Gio.File | |
Resolves a relative path for file to an absolute path.
Resolves a relative path for file to an absolute path.
This call does no blocking i/o. is NULL or if file is invalid. Free the returned object with g_object_unref().
|
Gio.File | |
set_attribute
(String attribute, FileAttributeType type, void* value_p, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets an attribute in the file with attribute name attribute to value.
Sets an attribute in the file with attribute name attribute to value.
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
set_attribute_byte_string
(String attribute, String value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to value.
If attribute is of a different type, this operation will fail, returning FALSE. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. in the file, FALSE otherwise.
|
Gio.File | |
set_attribute_int32
(String attribute, gint32 value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_INT32 to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_INT32 to value.
If attribute is of a different type, this operation will fail. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. in the file, FALSE otherwise.
|
Gio.File | |
set_attribute_int64
(String attribute, gint64 value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_INT64 to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_INT64 to value.
If attribute is of a different type, this operation will fail. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
set_attribute_string
(String attribute, String value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_STRING to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_STRING to value.
If attribute is of a different type, this operation will fail. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
set_attribute_uint32
(String attribute, guint32 value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_UINT32 to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_UINT32 to value.
If attribute is of a different type, this operation will fail. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. in the file, FALSE otherwise.
|
Gio.File | |
set_attribute_uint64
(String attribute, guint64 value, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_UINT64 to value.
Sets attribute of type G_FILE_ATTRIBUTE_TYPE_UINT64 to value.
If attribute is of a different type, this operation will fail. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. in the file, FALSE otherwise.
|
Gio.File | |
set_attributes_async
(FileInfo info, FileQueryInfoFlags flags, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously sets the attributes of file with info.
Asynchronously sets the attributes of file with info.
For more details, see g_file_set_attributes_from_info() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_set_attributes_finish() to get the result of the operation.
|
Gio.File | |
Finishes setting an attribute started in g_file_set_attributes_async().
Finishes setting an attribute started in g_file_set_attributes_async().
|
Gio.File | |
set_attributes_from_info
(FileInfo info, FileQueryInfoFlags flags, Cancellable cancellable)
:
gboolean
Tries to set all attributes in the GFileInfo on the target values,
not stopping on the first error.
Tries to set all attributes in the GFileInfo on the target values,
not stopping on the first error. If there is any error during this operation then error will be set to the first error. Error on particular fields are flagged by setting the "status" field in the attribute value to G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect further errors. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
Renames file to the specified display name.
Renames file to the specified display name.
The display name is converted from UTF8 to the correct encoding for the target filesystem if possible and the file is renamed to this. If you want to implement a rename operation in the user interface the edit name (G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename widget, and then the result after editing should be passed to g_file_set_display_name(). On success the resulting converted filename is returned. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. if there was an error. Free the returned object with g_object_unref().
|
Gio.File | |
set_display_name_async
(String display_name, gint32 io_priority, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously sets the display name for a given GFile.
Asynchronously sets the display name for a given GFile.
For more details, see g_file_set_display_name() which is the synchronous version of this call. When the operation is finished, callback will be called. You can then call g_file_set_display_name_finish() to get the result of the operation.
|
Gio.File | |
set_display_name_finish
(AsyncResult res)
:
Gio.File
Finishes setting a display name started with
g_file_set_display_name_async().
Finishes setting a display name started with
g_file_set_display_name_async(). Free the returned object with g_object_unref().
|
Gio.File | |
start_mountable
(DriveStartFlags flags, MountOperation start_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Starts a file of type G_FILE_TYPE_MOUNTABLE.
Starts a file of type G_FILE_TYPE_MOUNTABLE.
Using start_operation, you can request callbacks when, for instance, passwords are needed during authentication. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation.
|
Gio.File | |
start_mountable_finish
(AsyncResult result)
:
gboolean
Finishes a start operation.
Finishes a start operation. See g_file_start_mountable() for details.
Finish an asynchronous start operation that was started with g_file_start_mountable(). otherwise.
|
Gio.File | |
stop_mountable
(MountUnmountFlags flags, MountOperation mount_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Stops a file of type G_FILE_TYPE_MOUNTABLE.
Stops a file of type G_FILE_TYPE_MOUNTABLE.
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_stop_mountable_finish() to get the result of the operation.
|
Gio.File | |
stop_mountable_finish
(AsyncResult result)
:
gboolean
Finishes an stop operation, see g_file_stop_mountable() for details.
Finishes an stop operation, see g_file_stop_mountable() for details.
Finish an asynchronous stop operation that was started with g_file_stop_mountable(). otherwise.
|
Gio.File | |
supports_thread_contexts
()
:
gboolean
Checks if file supports linkend="g-main-context-push-thread-default-context">thread-default
contexts.
Checks if file supports linkend="g-main-context-push-thread-default-context">thread-default
contexts. If this returns FALSE, you cannot perform asynchronous operations on file in a thread that has a thread-default context.
|
Gio.File | |
trash
(Cancellable cancellable)
:
gboolean
Sends file to the "Trashcan", if possible.
Sends file to the "Trashcan", if possible. This is similar to
deleting it, but the user can recover it before emptying the trashcan. Not all file systems support trashing, so this call can return the G_IO_ERROR_NOT_SUPPORTED error. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
|
Gio.File | |
unmount_mountable
(MountUnmountFlags flags, Cancellable cancellable, Function callback, void* user_data)
:
none
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation.
|
Gio.File | |
unmount_mountable_finish
(AsyncResult result)
:
gboolean
Finishes an unmount operation, see g_file_unmount_mountable() for details.
Finishes an unmount operation, see g_file_unmount_mountable() for details.
Finish an asynchronous unmount operation that was started with g_file_unmount_mountable(). otherwise.
|
Gio.File | |
unmount_mountable_with_operation
(MountUnmountFlags flags, MountOperation mount_operation, Cancellable cancellable, Function callback, void* user_data)
:
none
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. When the operation is finished, callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation.
|
Gio.File | |
unmount_mountable_with_operation_finish
(AsyncResult result)
:
gboolean
Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
Finish an asynchronous unmount operation that was started with g_file_unmount_mountable_with_operation(). otherwise.
|
Gio.File |
None |
Class / Namespace | Method / Signal / Properties |
---|---|
EvinceDocument
Method |
|
EvinceDocument
Method |
EvinceDocument.tmp_file_unlink
(File file)
:
none
|
EvinceDocument.Attachment
Method |
|
Gio
Method |
Tries to guess the type of the tree with root root, by
looking at the files it contains. |
Gio
Method |
Creates a GFile with the given argument from the command line.
|
Gio
Method |
Constructs a GFile for a given path.
|
Gio
Method |
Constructs a GFile for a given URI.
|
Gio
Method |
Constructs a GFile with the given parse_name (i.e.
|
Gio.FileEnumerator
Property |
container : Gio.File
|
Gio.FileEnumerator
Method |
get_container
()
:
Gio.File
Get the GFile container which is being enumerated.
|
Gio.FileIcon
Property |
file : Gio.File
The file containing the icon.
|
Gio.FileIcon
Method |
get_file
()
:
Gio.File
Gets the GFile associated with the given icon.
|
Gio.FileMonitor
Signal |
Emitted when file has been changed.
|
Gio.FileMonitor
Method |
Emits the GFileMonitor::changed signal if a change
has taken place. |
Gio.Mount
Method |
get_default_location
()
:
Gio.File
Gets the default location of mount.
|
Gio.Mount
Method |
get_root
()
:
Gio.File
Gets the root directory on mount.
|
Gio.Vfs
Method |
Gets a GFile for path.
|
Gio.Vfs
Method |
Gets a GFile for uri.
|
Gio.Vfs
Method |
This operation never fails, but the returned object might
not support any I/O operations if the parse_name cannot be parsed by the GVfs module. |
Gio.Volume
Method |
get_activation_root
()
:
Gio.File
Gets the activation root for a GVolume if it is known ahead of
mount time. |
Gtk.AppChooserDialog
Property |
gfile : Gio.File
The GFile used by the GtkAppChooserDialog.
|
Gtk.AppChooserDialog
Method |
Create a new Gtk.AppChooserDialog
|
Gtk.CssProvider
Method |
Loads the data contained in file into css_provider, making it
clear any previously loaded information. |
Gtk.FileChooser
Method |
get_current_folder_file
()
:
Gio.File
Gets the current folder of chooser as GFile.
|
Gtk.FileChooser
Method |
get_file
()
:
Gio.File
Gets the GFile for the currently selected file in
the file selector. |
Gtk.FileChooser
Method |
get_preview_file
()
:
Gio.File
Gets the GFile that should be previewed in a custom preview
Internal function, see gtk_file_chooser_get_preview_uri(). |
Gtk.FileChooser
Method |
Selects the file referred to by file.
|
Gtk.FileChooser
Method |
Sets the current folder for chooser from a GFile.
|
Gtk.FileChooser
Method |
Sets file as the current filename for the file chooser, by changing
to the file's parent folder and actually selecting the file in list. |
Gtk.FileChooser
Method |
unselect_file
(File file)
:
none
Unselects the file referred to by file.
|
TelepathyGLib.Contact
Property |
avatar_file : Gio.File
read only
|
TelepathyGLib.Contact
Method |
get_avatar_file
()
:
Gio.File
|