Creates a symbolic link. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string with the value of the new symlink. Cancellable object. a #GError. %TRUE on the creation of a new symlink, %FALSE otherwise. Finishes closing a file enumerator, started from g_file_enumerator_close_async(). If the file enumerator was already closed when g_file_enumerator_close_async() was called, then this function will throw a Gio::Error with CLOSED, and return %FALSE. If the file enumerator had pending operation when the close operation was started, then this function will throw a Gio::Error with PENDING, and return %FALSE. The operation may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error with CANCELLED will be thrown, and %FALSE will be returned. 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. Some file systems don't allow all file names, and may throw a Gio::Error with INVALID_FILENAME. If the file is a directory a Gio::Error with IS_DIRECTORY will be thrown. Other errors are possible too, and depend on what kind of filesystem the file is on. input #GFile. a set of #GFileCreateFlags. Cancellable object. a #GError, or %NULL a #GFileOutputStream. Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. If @attribute is of a different type, this operation will fail. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a #gint32 containing the attribute's new value. a #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. Deletes a file. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. Cancellable object. a #GError, or %NULL %TRUE if the file was deleted. %FALSE otherwise. Seeks in the stream by the given @offset, modified by @type. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a #GSeekable. a #goffset. a #GSeekType. Cancellable object. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string. Cancellable object. a #GError, or %NULL a #GFile specifying what @file was renamed to, or %NULL if there was an error. 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a string containing the attribute's new value. a #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. 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 @attribute 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. @attribute should be a comma-separated list of attribute 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. 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, a Gio::Error with NOT_FOUND will be thrown. Other errors are possible too, and depend on what kind of filesystem the file is on. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. Cancellable object. a #GError. a #GFileInfo for the given @file, or %NULL on error. Tries to skip @count bytes from the stream. Will block during the operation. This is identical to g_input_stream_read(), from a behaviour standpoint, but the bytes that are skipped are not returned to the user. Some streams have an implementation that is more efficient than reading the data. This function is optional for inherited classes, as the default implementation emulates it using read. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. a #GInputStream. the number of bytes that will be skipped from the stream Cancellable object. location to store the error occuring, or %NULL to ignore Number of bytes skipped, or -1 on error Creates a directory. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. Cancellable object. a #GError, or %NULL %TRUE on successful creation, %FALSE otherwise. Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. If @attribute is of a different type, this operation will fail. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a #guint32 containing the attribute's new value. a #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. 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). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. Cancellable object. a #GError, or %NULL a #GFileAttributeInfoList describing the writable namespaces. When you are done with it, release it with g_file_attribute_info_list_unref() 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 throw a Gio::Error with NOT_SUPPORTED. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. #GFile to send to trash. Cancellable object. a #GError, or %NULL %TRUE on successful trash, %FALSE otherwise. 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a #GFileInfo. #GFileQueryInfoFlags Cancellable object. a #GError, or %NULL %TRUE if there was any error, %FALSE otherwise. Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. If @attribute is of a different type, this operation will fail. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a #guint64 containing the attribute's new value. a #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. Flushed any outstanding buffers in the stream. Will block during the operation. Closing the stream will implicitly cause a flush. This function is optional for inherited classes. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a #GOutputStream. Cancellable object. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE on error Truncates a stream with a given #offset. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. a #GSeekable. a #goffset. Cancellable object. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. Tries to read a single byte from the stream or the buffer. Will block during this read. On success, the byte read from the stream is returned. On end of stream -1 is returned but it's not an exceptional error and @error is not set. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. #GBufferedInputStream. Cancellable object. location to store the error occuring, or %NULL to ignore. the byte read from the @stream, or -1 on end of stream or error. Reads an unsigned 64-bit/8-byte value from @stream. In order to get the correct byte order for this read operation, see g_data_stream_get_byte_order(). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a given #GDataInputStream. Cancellable object. #GError for error reporting. an unsigned 64-bit/8-byte read from @stream or %0 if an error occurred. Queries a file output stream for the given @attributes. This function blocks while querying the stream. For the asynchronous version of this function, see g_file_output_stream_query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with PENDING. Can fail if the stream was already closed (throwing a Gio::Error with CLOSED), the stream has pending operations (throwing a Gio::Error with PENDING), or if querying info is not supported for the stream's interface (throwing a Gio::Error with NOT_SUPPORTED). In all cases of failure, %NULL will be returned. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED, and %NULL will be returned. a #GFileOutputStream. a file attribute query string. Cancellable object. a #GError, %NULL to ignore. a #GFileInfo for the @stream, or %NULL on error. Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. If @attribute is of a different type, this operation will fail. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a #guint64 containing the attribute's new value. a #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set, %FALSE otherwise. Gets a #GMount for the #GFile. If the #GFileIface for @file does not have a mount (e.g. possibly a remote share), a Gio::Error will be thrown with NOT_FOUND and %NULL will be returned. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. Cancellable object. a #GError. a #GMount where the @file is located or %NULL on error. Reads a 64-bit/8-byte value from @stream. In order to get the correct byte order for this read operation, see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a given #GDataInputStream. Cancellable object. #GError for error reporting. a signed 64-bit/8-byte value read from @stream or %0 if an error occurred. Tries to read @count bytes from the stream into the buffer. Will block during this read. If @count is zero, returns zero and does nothing. A value of @count larger than %G_MAXSSIZE will cause a Gio::Error to be thrown, with INVALID_ARGUMENT. On success, the number of bytes read into the buffer is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if @count is zero), but never otherwise. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. For the asynchronous, non-blocking, version of this function, see g_buffered_input_stream_fill_async(). #GBufferedInputStream. the number of bytes that will be read from the stream. Cancellable object. location to store the error occuring, or %NULL to ignore. the number of bytes read into @stream's buffer, up to @count, or -1 on error. Reads a signed 32-bit/4-byte value from @stream. In order to get the correct byte order for this read operation, see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a given #GDataInputStream. Cancellable object. #GError for error reporting. a signed 32-bit/4-byte value read from the @stream or %0 if an error occurred. Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. If @attribute is of a different type, this operation will fail. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. a string containing the attribute's value. #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the @attribute was successfully set, %FALSE otherwise. Creates a new file and returns an output stream for writing to it. The file must not already exists. 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If a file or directory with this name already exists a Gio::Error with EXISTS will be thrown. Some file systems don't allow all file names, and may throw a Gio::Error with INVALID_FILENAME, and if the name is to long a Gio::Error with FILENAME_TOO_LONG will be thrown. Other errors are possible too, and depend on what kind of filesystem the file is on. input #GFile. a set of #GFileCreateFlags. Cancellable object. a #GError, or %NULL a #GFileOutputStream for the newly created file, or %NULL on error. Loads the content of the file into memory, returning the size of the data. The data is always zero terminated, but this is not included in the resultant @length. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. Cancellable object. a location to place the contents of the file. a location to place the length of the contents of the file. a location to place the current entity tag for the file. a #GError, or %NULL %TRUE if the @file's contents were successfully loaded. %FALSE if there were errors.. Closes the stream, releasing resources related to it. Once the stream is closed, all other operations will throw a Gio::Error with CLOSED. Closing a stream multiple times will not cause an error to be thrown. Closing a stream will automatically flush any outstanding buffers in the stream. Streams will be automatically closed when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. Some streams might keep the backing store of the stream (e.g. a file descriptor) open after the stream is closed. See the documentation for the individual stream for details. On failure the first error that happened will be reported, but the close operation will finish as much as possible. A stream that failed to close will still throw a Gio::Error with CLOSED for all operations. Still, it is important to check and report the error to the user, otherwise there might be a loss of data as all data might not be written. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. Cancelling a close will still leave the stream closed, but there some streams can use a faster close that doesn't block to e.g. check errors. On cancellation (as with any error) there is no guarantee that all written data will reach the target. A #GOutputStream. Cancellable object. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE on failure Replaces the contents of @file with @contents of @length bytes. If @etag is specified any existing file must have that etag, or a Gio::Errrow with WRONG_ETAG will be thrown. If @make_backup is %TRUE, this function will attempt to make a backup of @file. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. The returned @new_etag can be used to verify that the file hasn't changed the next time it is saved over. input #GFile. a string containing the new contents for @file. the length of @contents in bytes. the old <link linkend="gfile-etag">entity tag</link> for the document. %TRUE if a backup should be created. a set of #GFileCreateFlags. a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed. Cancellable object. a #GError, or %NULL %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. Reads a line from the data input stream. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a given #GDataInputStream. a #gsize to get the length of the data read in. Cancellable object. #GError for error reporting. a string with the line that was read in (including the newlines). Set @length to a #gsize to get the length of the read line. Returns %NULL on an error. Tries to read @count bytes from the stream into the buffer starting at @buffer. Will block during this read. If count is zero returns zero and does nothing. A value of @count larger than %G_MAXSSIZE will cause a Gio::Error with INVALID_ARGUMENT to be thrown. On success, the number of bytes read into the buffer is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if @count is zero), but never otherwise. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. a #GInputStream. a buffer to read data into (which should be at least count bytes long). the number of bytes that will be read from the stream Cancellable object. location to store the error occuring, or %NULL to ignore Number of bytes read, or -1 on error 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 @attribute 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. @attribute should be a comma-separated list of attribute 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. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. If the file is not a directory, a Glib::FileError with NOTDIR will be returned. Other errors are possible too. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. Cancellable object. #GError for error reporting. A #GFileEnumerator if successful, %NULL on error. Reads an unsigned 32-bit/4-byte value from @stream. In order to get the correct byte order for this read operation, see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. a given #GDataInputStream. Cancellable object. #GError for error reporting. an unsigned 32-bit/4-byte value read from the @stream or %0 if an error occurred. Closes the stream, releasing resources related to it. Once the stream is closed, all other operations will throw a Gio::Error with CLOSED. Closing a stream multiple times will not return an error. Streams will be automatically closed when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. Some streams might keep the backing store of the stream (e.g. a file descriptor) open after the stream is closed. See the documentation for the individual stream for details. On failure the first error that happened will be reported, but the close operation will finish as much as possible. A stream that failed to close will still throw a Gio::Error with CLOSED for all operations. Still, it is important to check and report the error to the user. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. Cancelling a close will still leave the stream closed, but some streams can use a faster close that doesn't block to e.g. check errors. A #GInputStream. Cancellable object. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE on failure 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 @attribute 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. @attribute should be a comma-separated list of attribute 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). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. Other errors are possible too, and depend on what kind of filesystem the file is on. input #GFile. an attribute query string. Cancellable object. a #GError. a #GFileInfo or %NULL if there was an error. Tries to write @count bytes from @buffer into the stream. Will block during the operation. If count is zero returns zero and does nothing. A value of @count larger than %G_MAXSSIZE will cause a Gio::Error with INVALID_ARGUMENT to be thrown. On success, the number of bytes written to the stream is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. on a partial i/o error, or if there is not enough storage in the stream. All writes either block until at least one byte is written, so zero is never returned (unless @count is zero). The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. a #GOutputStream. the buffer containing the data to write. the number of bytes to write Cancellable object. location to store the error occuring, or %NULL to ignore Number of bytes written, or -1 on error Obtains a file monitor for the given file. If no file notification mechanism exists, then regular polling of the file is used. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a set of #GFileMonitorFlags. Cancellable object. a #GError, or %NULL. a #GFileMonitor for the given @file. Sets an attribute in the file with attribute name @attribute to @value. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a string containing the attribute's name. The type of the attribute a pointer to the value (or the pointer itself if the type is a pointer type) a set of #GFileQueryInfoFlags. Cancellable object. a #GError, or %NULL %TRUE if the attribute was set, %FALSE otherwise. Opens a file for reading. The result is a #GFileInputStream that can be used to read the contents of the file. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. If the file is a directory, a Gio::Error with IS_DIRECTORY will be thrown. Other errors are possible too, and depend on what kind of filesystem the file is on. #GFile to read. a #GCancellable a #GError, or %NULL #GFileInputStream or %NULL on error. Obtains a directory monitor for the given file. This may fail if directory monitoring is not supported. The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error will be thrown with CANCELLED. input #GFile. a set of #GFileMonitorFlags. Cancellable object. a #GError, or %NULL. a #GFileMonitor for the given @file, or %NULL on error. Utility function to check if a particular file exists. This is implemented using 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 if it doesn't exist, creating it. There are two racy versions: read it, and on error create it; and: check if it exists, if not create it. These 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 File::create() which will either atomically create the file or fail with a Gio::Error exception with EXISTS. 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. input #GFile. optional #GCancellable object, %NULL to ignore. %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled). A #GDBusProxy. Name of method to invoke. A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. Flags from the #GDBusCallFlags enumeration. The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. Use another overload without this parameter if your don't care about the result of the method invocation. The data to pass to @callback. A #GDBusProxy. Name of method to invoke. A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. Flags from the #GDBusCallFlags enumeration. The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout. A #GUnixFDList or %NULL. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. Use another overload without this parameter if your don't care about the result of the method invocation. The data to pass to @callback.