Adds a new attribute with @name to the @list, setting its @type and @flags. a #GFileAttributeInfoList. the name of the attribute to add. the #GFileAttributeType for the attribute. #GFileAttributeInfoFlags for the attribute. Flushes a stream asynchronously. For behaviour details see g_output_stream_flush(). When the operation is finished @callback will be called. You can then call g_output_stream_flush_finish() to get the result of the operation. a #GOutputStream. the io priority of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Clears the pending flag on @stream. input stream References a file attribute info list. a #GFileAttributeInfoList to reference. #GFileAttributeInfoList or %NULL on error. Checks if the file enumerator has been closed. a #GFileEnumerator. %TRUE if the @enumerator is closed. Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async(). a #GLoadableIcon. an integer. a location to store the type of the loaded icon, %NULL to ignore. optional #GCancellable object, %NULL to ignore. a #GError location to store the error occuring, or %NULL to ignore. a #GInputStream to read the icon from. Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_finish() with the @mount and #GAsyncResults data returned in the @callback. a #GMount. flags affecting the unmount if required for eject optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. user data passed to @callback. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. a string. Checks if @drive is capabable of automatically detecting media changes. a #GDrive. %TRUE if the @drive is capabable of automatically detecting media changes, %FALSE otherwise. Resets @cancellable to its uncancelled state. a #GCancellable object. Gets a new #GUnixMountMonitor. a #GUnixMountMonitor. Adds a content type to the application information to indicate the application is capable of opening files with the given content type. a #GAppInfo. a string. a #GError. %TRUE on success, %FALSE on error. Gets the file's size. a #GFileInfo. a #goffset containing the file's size. Sets the @attribute to contain the given value, if possible. a #GFileInfo. a file attribute key. a #GFileAttributeType pointer to the value Creates a symbolic link. 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. input #GFile. a string with the value of the new symlink. optional #GCancellable object, %NULL to ignore. a #GError. %TRUE on the creation of a new symlink, %FALSE otherwise. Finishes a stream skip operation. a #GInputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. the size of the bytes skipped, or %-1 on error. Gets the value of a boolean attribute. If the attribute does not contain a boolean value, %FALSE will be returned. a #GFileInfo. a file attribute key. the boolean value contained within the attribute. Sets the mount operation's domain. a #GMountOperation. the domain to set. Sets the sort order attribute in the file info structure. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. a #GFileInfo. a sort order integer. Checks if a unix mount point is a loopback device. a #GUnixMountPoint. %TRUE if the mount point is a loopback. %FALSE otherwise. Gets a password from the mount operation. a #GMountOperation. a string containing the password within @op. Request information for a number of files from the enumerator asynchronously. When all i/o for the operation is finished the @callback will be called with the requested information. The callback can be called with less than @num_files files in case of error or at the end of the enumerator. In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. If a request is cancelled the callback will be called with %G_IO_ERROR_CANCELLED. During an async request no other sync and async calls are allowed, and will result in %G_IO_ERROR_PENDING errors. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. a #GFileEnumerator. the number of file info objects to request the <link linkend="gioscheduler">io priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function 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. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Get the user name from the mount operation. a #GMountOperation. a string containing the user name. Asynchronously queries the @stream for a #GFileInfo. When completed, @callback will be called with a #GAsyncResult which can be used to finish the operation with g_file_output_stream_query_info_finish(). For the synchronous version of this function, see g_file_output_stream_query_info(). a #GFileOutputStream. a file attribute query string. the <link linkend="gio-GIOScheduler">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Sets the file type in a #GFileInfo to @type. See %G_FILE_ATTRIBUTE_STANDARD_TYPE. a #GFileInfo. a #GFileType. Reads a 16-bit/2-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(). a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. a signed 16-bit/2-byte value read from @stream or %0 if an error occurred. Creates a new file attribute info list. a #GFileAttributeInfoList. 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. input #GFile. a string containing the #GFile's parse name. The returned string should be freed with g_free() when no longer needed. Gets the user data from a #GAsyncResult. a #GAsyncResult. the user data for @res. Gets a list of strings containing all the registered content types known to the system. The list and its data should be freed using @g_list_foreach(list, g_free, NULL) and @g_list_free(list) #GList of the registered content types. Creates a new GIOModule that will load the specific shared library when in use. filename of the shared library module. a #GIOModule from given @filename, or %NULL on error. Clears the status information from @info. a #GFileInfo. Starts an asynchronous eject on a mountable. When this operation has completed, @callback will be called with @user_user data, and the operation can be finalized 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. input #GFile. flags affecting the operation optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied, or %NULL. the data to pass to callback function Checks if a file is a backup file. a #GFileInfo. %TRUE if file is a backup file, %FALSE otherwise. 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. input #GFile. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's content type, see g_file_info_get_content_type(). a #GFileInfo. a #GFileType for the given file. Emitted when a file has been changed. a #GFileMonitor. a #GFile. a #GFile. a #GFileMonitorEvent. Duplicates a file info structure. a #GFileInfo. a duplicate #GFileInfo of @other. Checks if a file is a symlink. a #GFileInfo. %TRUE if the given @info is a symlink. Checks if @mount can be mounted. a #GMount. %TRUE if the @mount can be unmounted. Finishes an asynchronous filesystem info query. See g_file_query_filesystem_info_async(). input #GFile. a #GAsyncResult. a #GError. #GFileInfo for given @file or %NULL on error. Creates a new filename completer. a #GFilenameCompleter. Puts a signed 16-bit integer into the output stream. a #GDataOutputStream. a #gint16. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Looks up an existing extension point. the name of the extension point the #GIOExtensionPoint, or %NULL if there is no registered extension point with the given name Gets the identifier of the given kind for @volume. See the <link linkend="volume-identifier">introduction</link> for more information about volume identifiers. a #GVolume the kind of identifier to return a newly allocated string containing the requested identfier, or %NULL if the #GVolume doesn't have this kind of identifier Sets the content type attribute for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. a #GFileInfo. a content type. See #GContentType. Information about an installed application from a desktop file. Guesses the icon of a Unix mount point. a #GUnixMountPoint a #GIcon Gets the required type for @extension_point. a #GIOExtensionPoint the #GType that all implementations must have, or #G_TYPE_INVALID if the extension point has no required type Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load(). a #GLoadableIcon. an integer. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function This function sets the byte order for the given @stream. All subsequent reads from the @stream will be read in the given @order. a given #GDataInputStream. a #GDataStreamByteOrder to set. Finishes setting a display name started with g_file_set_display_name_async(). input #GFile. a #GAsyncResult. a #GError, or %NULL a #GFile or %NULL on error. Sets the edit name for the current file. See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. a #GFileInfo. a string containing an edit name. Frees a unix mount point. unix mount point to free. Initiates startup notification for the applicaiont and returns the DESKTOP_STARTUP_ID for the launched operation, if supported. Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard, at <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"/>. a #GAppLaunchContext. a #GAppInfo. a #GList of files. a startup notification ID for the application, or %NULL if not supported. Finishes an asynchronous file info query. See g_file_query_info_async(). input #GFile. a #GAsyncResult. a #GError. #GFileInfo for given @file or %NULL on error. Finishes an asynchronous find mount request. See g_file_find_enclosing_mount_async(). a #GFile a #GAsyncResult a #GError #GMount for given @file or %NULL on error. 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 report %G_IO_ERROR_CLOSED in @error, and return %FALSE. If the file enumerator had pending operation when the close operation was started, then this function will report %G_IO_ERROR_PENDING, and return %FALSE. If @cancellable was not %NULL, then the operation may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be returned. a #GFileEnumerator. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if the close operation has finished successfully. Sets the application as the default handler for a given type. a #GAppInfo. the content type. a #GError. %TRUE on success, %FALSE on error. Emitted when the operation has been cancelled from another thread. Can be used by implementations of cancellable operations. This will be emitted in the thread that tried to cancel the operation, not the thread the is running the operation. a #GCancellable. Gets a #GUnixMountEntry for a given mount path. If @time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mounts_changed_since(). path for a possible unix mount. guint64 to contain a timestamp. a #GUnixMount. Copies the file @source to the location specified by @destination asynchronously. For details of the behaviour, see g_file_copy(). If @progress_callback is not %NULL, then that function that will be called just like in g_file_copy(), however the callback will run in the main loop, not in the thread that is doing the I/O operation. When the operation is finished, @callback will be called. You can then call g_file_copy_finish() to get the result of the operation. input #GFile. destination #GFile set of #GFileCopyFlags the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. function to callback with progress information user data to pass to @progress_callback a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Checks if a cancellable job has been cancelled. a #GCancellable or NULL. %TRUE if @cancellable is cancelled, FALSE if called with %NULL or if item is not cancelled. Gets the kinds of identifiers that @drive has. Use g_drive_get_identifer() to obtain the identifiers themselves. a #GDrive a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() to free. Gets a list of the volumes on the system. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). a #GVolumeMonitor. a #GList of #GVolume<!-- -->s. Creates a new #GMemoryInputStream with data in memory of a given size. input data length of the data, may be -1 if @data is a nul-terminated string function that is called to free @data, or %NULL new #GInputStream read from @data of @len bytes. Checks if a file is hidden. a #GFileInfo. %TRUE if the file is a hidden file, %FALSE otherwise. Gets the names of icons from within @icon. a #GThemedIcon. a list of icon names. Checks if an input stream is closed. input stream. %TRUE if the stream is closed. Check if @drive has any mountable volumes. a #GDrive. %TRUE if the @drive contains volumes, %FALSE otherwise. Gets a human-readable description of an installed application. a #GAppInfo. a string containing a description of the application @appinfo, or %NULL if none. Checks if two #GAppInfos are equal. the first #GAppInfo. the second #GAppInfo. %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. Guesses the name of a Unix mount. The result is a translated string. a #GUnixMountEntry A newly allocated string that must be freed with g_free() Checks if an output stream has already been closed. a #GOutputStream. %TRUE if @stream is closed. %FALSE otherwise. Gets the local pathname for #GFile, if one exists. This call does no blocking i/o. input #GFile. string containing the #GFile's path, or %NULL if no such path exists. The returned string should be freed with g_free() when no longer needed. Requests an asynchronous closes of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_input_stream_close_finish() to get the result of the operation. For behaviour details see g_input_stream_close(). The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. A #GInputStream. the <link linkend="io-priority">I/O priority</link> of the request. optional cancellable object callback to call when the request is satisfied the data to pass to callback function Queries a file input stream the given @attributes. This function blocks while querying the stream. For the asynchronous (non-blocking) version of this function, see g_file_input_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 %G_IO_ERROR_PENDING. a #GFileInputStream. a file attribute query string. optional #GCancellable object, %NULL to ignore. a #GError location to store the error occuring, or %NULL to ignore. a #GFileInfo, or %NULL on error. Checks if a volume can be mounted. a #GVolume. %TRUE if the @volume can be mounted. %FALSE otherwise. Gets the source tag for the #GSimpleAsyncResult. a #GSimpleAsyncResult. a #gpointer to the source object for the #GSimpleAsyncResult. 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. input #GFile. a set of #GFileCreateFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GFileOutputStream. Gets the volume monitor used by gio. a reference to the #GVolumeMonitor used by gio. Call g_object_unref() when done with it. Returns: read-only buffer a #GBufferedInputStream. a #gsize to get the number of bytes available in the buffer. read-only buffer Emitted when the physical eject button (if any) of a drive have been pressed. a #GDrive. Finishes a mount operation started by g_file_mount_enclosing_volume(). input #GFile. a #GAsyncResult. a #GError, or %NULL %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error. input stream a #GError location to store the error occuring, or %NULL to ignore. %TRUE if pending was previously unset and is now set. 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. input #GFile. a string containing the attribute's name. a #gint32 containing the attribute's new value. a #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. Cancels a file monitor. a #GFileMonitor. %TRUE if monitor was cancelled. Creates a new data output stream for @base_stream. a #GOutputStream. #GDataOutputStream. Gets the root directory on @mount. a #GMount. a #GFile. Gets the #GFile associated with the given @icon. a #GIcon. a #GFile, or %NULL. Creates a new #GUnixInputStream for the given @fd. If @close_fd_at_close is %TRUE, the file descriptor will be closed when the stream is closed. unix file descriptor. a #gboolean. a #GUnixInputStream. Reads an unsigned 8-bit/1-byte value from @stream. a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. an unsigned 8-bit/1-byte value read from the @stream or %0 if an error occurred. Launches the application. Passes @files to the launched application as arguments, using the optional @launch_context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. To lauch the application without arguments pass a %NULL @files list. Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this. Some URIs can be changed when passed through a GFile (for instance unsupported uris with strange formats like mailto:), so if you have a textual uri you want to pass in as argument, consider using g_app_info_launch_uris() instead. a #GAppInfo. a #GList of #GFile objects. a #GAppLaunchContext. a #GError. %TRUE on successful launch, %FALSE otherwise. 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. input #GFile. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the file was deleted. %FALSE otherwise. Seeks in the stream by the given @offset, modified by @type. 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. a #GSeekable. a #goffset. a #GSeekType. optional #GCancellable object, %NULL to ignore. 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. Creates a new #GDesktopAppInfo. a string containing a file name. a new #GDesktopAppInfo or %NULL on error. Finds a #GIOExtension for an extension point by name. a #GIOExtensionPoint the name of the extension to get the #GIOExtension for @extension_point that has the given name, or %NULL if there is no extension with that name Gets the current newline type for the @stream. a given #GDataInputStream. #GDataStreamNewlineType for the given @stream. Checks if a drive can be polled for media changes. a #GDrive. %TRUE if the @drive can be polled for media changes. %FALSE otherwise. Finishes a stream write operation. a #GOutputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. a #gssize containing the number of bytes written to the stream. Creates a new empty #GMemoryInputStream. a new #GInputStream Checks if a volume can be ejected. a #GVolume. %TRUE if the @volume can be ejected. %FALSE otherwise. Creates a new #GAppInfo from the given information. the commandline to use the application name, or %NULL to use @commandline flags that can specify details of the created #GAppInfo a #GError location to store the error occuring, %NULL to ignore. new #GAppInfo for given command. Finishes an asynchronous info query operation. a #GFileInputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. #GFileInfo. Universal Resource Identifier for the dummy file object. a new #GFile. Creates a new #GDesktopAppInfo. the desktop file id a new #GDesktopAppInfo, or %NULL if no desktop file with that id Used from an I/O job to send a callback to be run asynchronously in the main loop (main thread). The callback will be run when the main loop is available, but at that time the I/O job might have finished. The return value from the callback is ignored. Note that if you are passing the @user_data from g_io_scheduler_push_job() on to this function you have to ensure that it is not freed before @func is called, either by passing %NULL as @notify to g_io_scheduler_push_job() or by using refcounting for @user_data. a #GIOSchedulerJob a #GSourceFunc callback that will be called in the main thread data to pass to @func a #GDestroyNotify for @user_data, or %NULL Gets an array of completion strings for a given initial text. the filename completer. text to be completed. array of strings with possible completions for @initial_text. This array must be freed by g_strfreev() when finished. Gets the byte order for the stream. a #GDataOutputStream. the #GDataStreamByteOrder for the @stream. Sets the result from a #GError. a #GSimpleAsyncResult. #GError. 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. input #GFile. a string. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GFile specifying what @file was renamed to, or %NULL if there was an error. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. attribute name to set. int64 value to set attribute to. Reads an unsigned 16-bit/2-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(). a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. an unsigned 16-bit/2-byte value read from the @stream or %0 if an error occurred. Finishes remounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. a #GMount. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if the mount was successfully remounted. %FALSE otherwise. Gets the icon for a file. a #GFileInfo. #GIcon for the given @info. Creates a #GFile with the given argument from the command line. The value of @arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if @arg points to a malformed path. a command line string. a new #GFile. Gets the GIO Error Quark. a #GQuark. Sets the required type for @extension_point to @type. All implementations must henceforth have this type. a #GIOExtensionPoint the #GType to require This signal is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized. Obtain the list of settable attributes for the file. Returns: a #GFileAttributeInfoList describing the settable attributes. input #GFile. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GFileAttributeInfoList describing the settable attributes. When you are done with it, release it with g_file_attribute_info_list_unref() Determines the byte ordering that is used when writing multi-byte entities (such as integers) to the stream. 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. input #GFile. string to a possible child. #GError. a #GFile to the specified child, or %NULL if the display name couldn't be converted. 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. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Removes a supported type from an application, if possible. a #GAppInfo. a string. a #GError. %TRUE on success, %FALSE on error. Schedules the I/O job to run. @notify will be called on @user_data after @job_func has returned, regardless whether the job was cancelled or has run to completion. If @cancellable is not %NULL, it can be used to cancel the I/O job by calling g_cancellable_cancel() or by calling g_io_scheduler_cancel_all_jobs(). a #GIOSchedulerJobFunc. data to pass to @job_func a #GDestroyNotify for @user_data, or %NULL the <link linkend="gioscheduler">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. 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. input #GFile. a string containing the attribute's name. a string containing the attribute's new value. a #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. Sets the newline type for the @stream. Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read chunk ends in "CR" we must read an additional byte to know if this is "CR" or "CR LF", and this might block if there is no more data availible. a #GDataInputStream. the type of new line return as #GDataStreamNewlineType. Sets the operation result to a boolean within the asynchronous result. a #GSimpleAsyncResult. a #gboolean. Peeks in the buffer, copying data of size @count into @buffer, offset @offset bytes. a #GBufferedInputStream. a pointer to an allocated chunk of memory. a #gsize. a #gsize. a #gsize of the number of bytes peeked, or %-1 on error. Sets the mount operation's password to @password. a #GMountOperation. password to set. Sets the mount operation to use an anonymous user if @anonymous is %TRUE. a #GMountOperation. boolean value. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. an unsigned 32-bit integer. Gets the name of @volume. a #GVolume. the name for the given @volume. The returned string should be freed when no longer needed. Completes an asynchronous function in the main event loop using an idle function. a #GSimpleAsyncResult. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. a byte string. Gets the file system type for the mount point. a #GUnixMountPoint. a string containing the file system type. Checks if the @drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details. a #GDrive. %TRUE if @drive has media, %FALSE otherwise. Checks if the matcher will match all of the keys in a given namespace. This will always return %TRUE if a wildcard character is in use (e.g. if matcher was created with "standard::*" and @ns is "standard", or if matcher was created using "*" and namespace is anything.) TODO: this is awkwardly worded. a #GFileAttributeMatcher. a string containing a file attribute namespace. %TRUE if the matcher matches all of the entries in the given @ns, %FALSE otherwise. Gets the operation result boolean from within the asynchronous result. a #GSimpleAsyncResult. %TRUE if the operation's result was %TRUE, %FALSE if the operation's result was %FALSE. Sets the operation result within the asynchronous result to the given @op_res. a #GSimpleAsyncResult. a #gssize. Gets the icon for a content type. a content type string. #GIcon corresponding to the content type. Reload the mime information for the @dir. directory path which needs reloading. Finishes an asynchronous icon load started in g_loadable_icon_load_async(). a #GLoadableIcon. a #GAsyncResult. a location to store the type of the loaded icon, %NULL to ignore. a #GError location to store the error occuring, or %NULL to ignore. a #GInputStream to read the icon from. 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. 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. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError. a #GFileInfo for the given @file, or %NULL on error. Checks if a file info structure has an attribute named @attribute. a #GFileInfo. a file attribute key. %TRUE if @Ginfo has an attribute named @attribute, %FALSE otherwise. Get a list of mountable volumes for @drive. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). a #GDrive. #GList containing any #GVolume<!---->s on the given @drive. Sets the name of the desktop that the application is running in. This is used by g_app_info_should_show() to evaluate the <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> desktop entry fields. The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop Menu specification</ulink> recognizes the following: <simplelist> <member>GNOME</member> <member>KDE</member> <member>ROX</member> <member>XFCE</member> <member>Old</member> </simplelist> Should be called only once; subsequent calls are ignored. a string specifying what desktop this is This signal is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized. Finishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. a #GMount. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if the mount was successfully ejected. %FALSE otherwise. Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error. a #GOutputStream. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if pending was previously unset and is now set. Gets the attribute status for an attribute key. a #GFileInfo a file attribute key a #GFileAttributeStatus for the given @attribute, or %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid. Creates a new #GCancellable object. Applications that want to start one or more operations that should be cancellable should create a #GCancellable and pass it to the operations. One #GCancellable can be used in multiple consecutive operations, but not in multiple concurrent operations. a #GCancellable. 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. 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 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 optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore Number of bytes skipped, or -1 on error Sets the state of saving passwords for the mount operation. a #GMountOperation. a set of #GPasswordSave flags. Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detext the type of the file if required. the uri to show an optional #GAppLaunchContext. a #GError. %TRUE on success, %FALSE on error. Makes a duplicate of a file attribute info list. a #GFileAttributeInfoList to duplicate. a copy of the given @list. Sets the file enumerator as having pending operations. a #GFileEnumerator. a boolean value. Gets the file descriptor for a cancellable job. This can be used to implement cancellable operations on Unix systems. The returned fd will turn readable when @cancellable is cancelled. a #GCancellable. A valid file descriptor. %-1 if the file descriptor is not supported, or on errors. Finishes an asynchronous read. a #GBufferedInputStream. a #GAsyncResult. a #GError. a #gssize of the read stream, or %-1 on an error. Gets the icon for @mount. a #GMount. a #GIcon. Emits the #GMountOperation::reply signal. a #GMountOperation a #GMountOperationResult Creates a new themed icon for @iconname, and all the names that can be created by shortening @iconname at '-' characters. In the following example, @icon1 and @icon2 are equivalent: |[ const char *names[] = { "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome" }; icon1 = g_themed_icon_new_from_names (names, 4); icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); ]| a string containing an icon name a new #GThemedIcon. Creates a directory. 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. input #GFile. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE on successful creation, %FALSE otherwise. Checks if a drive can be ejected. pointer to a #GDrive. %TRUE if the @drive can be ejected. %FALSE otherwise. This function should be called by any #GVolumeMonitor implementation when a new #GMount object is created that is not associated with a #GVolume object. It must be called just before emitting the @mount_added signal. If the return value is not %NULL, the caller must associate the returned #GVolume object with the #GMount. This involves returning it in it's g_mount_get_volume() implementation. The caller must also listen for the "removed" signal on the returned object and give up it's reference when handling that signal Similary, if implementing g_volume_monitor_adopt_orphan_mount(), the implementor must take a reference to @mount and return it in it's g_volume_get_mount() implemented. Also, the implementor must listen for the "unmounted" signal on @mount and give up it's reference upon handling that signal. There are two main use cases for this function. One is when implementing a user space file system driver that reads blocks of a block device that is already represented by the native volume monitor (for example a CD Audio file system driver). Such a driver will generate it's own #GMount object that needs to be assoicated with the #GVolume object that represents the volume. The other is for implementing a #GVolumeMonitor whose sole purpose is to return #GVolume objects representing entries in the users "favorite servers" list or similar. a #GMount object to find a parent for the #GVolume object that is the parent for @mount or %NULL if no wants to adopt the #GMount. Closes an output stream. a #GOutputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if stream was successfully closed, %FALSE otherwise. Pushes @cancellable onto the cancellable stack. The current cancllable can then be recieved using g_cancellable_get_current(). This is useful when implementing cancellable operations in code that does not allow you to pass down the cancellable object. This is typically called automatically by e.g. #GFile operations, so you rarely have to call this yourself. optional #GCancellable object, %NULL to ignore. Request an asynchronous write of @count bytes from @buffer into the stream. When the operation is finished @callback will be called. You can then call g_output_stream_write_finish() to get the result of the operation. During an async request no other sync and async calls are allowed, and will result in %G_IO_ERROR_PENDING errors. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. On success, the number of bytes written will be passed to the @callback. 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, but generally we try to write as many bytes as requested. Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. For the synchronous, blocking version of this function, see g_output_stream_write(). A #GOutputStream. the buffer containing the data to write. the number of bytes to write the io priority of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Return value: a #GList containing the desktop ids which claim a mime type. a #GList containing the desktop ids which claim to handle @mime_type. Return value: A #GFileInfo or %NULL on error or end of enumerator a #GFileEnumerator. optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore A #GFileInfo or %NULL on error or end of enumerator Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info to the given symlink target. a #GFileInfo. a static string containing a path to a symlink target. Gets the domain of the mount operation. a #GMountOperation. a string set to the domain. Compares two unix mount points. a #GUnixMount. a #GUnixMount. 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively. Gets the identifier of the given kind for @drive. a #GDrive the kind of identifier to return a newly allocated string containing the requested identfier, or %NULL if the #GDrive doesn't have this kind of identifier Unreferences @matcher. If the reference count falls below 1, the @matcher is automatically freed. a #GFileAttributeMatcher. Gets a signed 32-bit integer contained within the attribute. If the attribute does not contain a signed 32-bit integer, or is invalid, 0 will be returned. a #GFileInfo. a file attribute key. a signed 32-bit integer from the attribute. 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. input #GFile. a string containing the attribute's name. a #guint32 containing the attribute's new value. a #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. a new #GVolumeMonitor. Gets the mount for the @volume. a #GVolume. a #GMount or %NULL if @volume isn't mounted. Checks whether @file has the prefix specified by @prefix. In other word, if the names of inital elements of @file<!-- -->s pathname match @prefix. 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. input #GFile. input #GFile. %TRUE if the @files's parent, grandparent, etc is @prefix. %FALSE otherwise. Emitted when the unix mount points have changed. Gets the drive for the @mount. This is a convenience method for getting the #GVolume and then using that object to get the #GDrive. a #GMount. a #GDrive or %NULL if @mount is not associated with a volume or a drive. Ejects a drive. a #GDrive. flags affecting the unmount if required for eject optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. a #gpointer. Guesses whether a Unix mount should be displayed in the UI. a #GUnixMountEntry %TRUE if @mount_entry is deemed to be displayable. Finds a #GMount object by it's UUID (see g_mount_get_uuid()) a #GVolumeMonitor. the UUID to look for a #GMount or %NULL if no such mount is available. File Descriptor. #GFileInputStream for the given file descriptor. Gets the base stream for the filter stream. a #GFilterInputStream. a #GInputStream. Checks equality of two given #GFile<!-- -->s. Note that two #GFile<!-- -->s 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. the first #GFile. the second #GFile. %TRUE if @file1 and @file2 are equal. %FALSE if either is not a #GFile. 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. input #GFile. a #GFileInfo. a #GFileQueryInfoFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback. a #gpointer. Reports an error in an asynchronous function in an idle function by directly setting the contents of the #GAsyncResult with the given error information. a #GObject. a #GAsyncReadyCallback. user data passed to @callback. a #GQuark containing the error domain (usually #G_IO_ERROR). a specific error code. a formatted error reporting string. a list of variables to fill in @format. a #GVolumeMonitor. a #GUnixMountPoint. a #GUnixVolume for the given #GUnixMountPoint. Sets the rate limit to which the @monitor will report consecutive change events to the same file. a #GFileMonitor. a integer with the limit in milliseconds to poll for changes. If the @cancelalble is cancelled, sets the error to notify that the operation was cancelled. a #GCancellable object. #GError to append error state to. %TRUE if @cancellable was cancelled, %FALSE if it was not. 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. input #GFile. string containing the child's basename. a #GFile to a child specified by @name. Finishes an asynchronous file create operation started with g_file_create_async(). input #GFile. a #GAsyncResult. a #GError, or %NULL a #GFileOutputStream or %NULL on error. Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_output_stream_close_finish() to get the result of the operation. For behaviour details see g_output_stream_close(). The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. A #GOutputStream. the io priority of the request. callback to call when the request is satisfied the data to pass to callback function optional cancellable object Gets the state of saving passwords for the mount operation. a #GMountOperation. a #GPasswordSave flag. Creates a new #GInputStream from the given @base_stream, with a buffer set to the default size (4 kilobytes). a #GInputStream. a #GInputStream for the given @base_stream. Guesses the content type based on example data. If the function is uncertain, @result_uncertain will be set to %TRUE. a string. a stream of data. the size of @data. a flag indicating the certainty of the result. a string indicating a guessed content type for the given data. Sets an error within the asynchronous result without a #GError. Unless writing a binding, see g_simple_async_result_set_error(). a #GSimpleAsyncResult. a #GQuark (usually #G_IO_ERROR). an error code. a formatted error reporting string. va_list of arguments. Checks if the file enumerator has pending operations. a #GFileEnumerator. %TRUE if the @enumerator has pending operations. Constructs a #GFile for a given URI. This operation never fails, but the returned object might not support any I/O operation if @uri is malformed or if the uri type is not supported. a string containing a URI. a #GFile for the given @uri. 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. input #GFile. optional #GCancellable object, %NULL to ignore. 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() #GIcon is a very minimal interface for icons. It provides functions for checking the equality of two icons and hashing of icons. #GIcon does not provide the actual pixmap for the icon as this is out of GIO's scope, however implementations of #GIcon may contain the name of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon). To obtain a hash of a #GIcon, see g_icon_hash(). To check if two #GIcons are equal, see g_icon_equal(). Interface for icons gio/gio.h filename of the directory to monitor. #GFileMonitorFlags. new #GFileMonitor for the given @dirname. Emitted when a drive changes. The volume monitor emitting the signal. the drive that changed Gets a choice from the mount operation. a #GMountOperation. an integer containing an index of the user's choice from the choice's list, or %0. Cancels all cancellable I/O jobs. A job is cancellable if a #GCancellable was passed into g_io_scheduler_push_job(). Polls @drive to see if media has been inserted or removed. a #GDrive. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. a #gpointer. 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. #GFile to send to trash. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE on successful trash, %FALSE otherwise. Gets a #GList of strings containing the unix mounts. If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mounts_changed_since(). guint64 to contain a timestamp. a #GList of the UNIX mounts. Sets whether to handle cancellation within the asynchronous operation. a #GSimpleAsyncResult. a #gboolean. 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. input #GFile. a #GFile structure to the parent of the given #GFile or %NULL if there is no parent. Returns: %TRUE if monitor is canceled. %FALSE otherwise. a #GFileMonitor %TRUE if monitor is canceled. %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. 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. input #GFile. a #GFileInfo. #GFileQueryInfoFlags optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if there was any error, %FALSE otherwise. Asynchronously creates a new file and returns an output stream for writing to it. The file must not already exists. 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. input #GFile. a set of #GFileCreateFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Puts an unsigned 32-bit integer into the stream. a #GDataOutputStream. a #guint32. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Checks if a attribute matcher only matches a given attribute. Always Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise. a #GFileAttributeMatcher. a file attribute key. %TRUE if the matcher only matches @attribute. %FALSE otherwise. Gets the path for @descendant relative to @parent. This call does no blocking i/o. input #GFile. input #GFile. string with the relative path from @descendant 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. Gets the installed name of the application. a #GAppInfo. the name of the application for @appinfo. Determines if @mount_path is considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user. a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename> %TRUE if @mount_path is considered an implementation detail of the OS. Gets the <link linkend="gfile-etag">entity tag</link> for a given #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE. a #GFileInfo. a string containing the value of the "etag:value" attribute. Finishes mounting a volume. pointer to a #GVolume. a #GAsyncResult. a #GError. %TRUE, %FALSE if operation failed. Gets the icon for the application. a #GAppInfo. the default #GIcon for @appinfo. Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()). This operation never fails, but the returned object might not support any I/O operation if the @parse_name cannot be parsed. a file name or path to be parsed. a new #GFile. Gets a list of drives connected to the system. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). a #GVolumeMonitor. a #GList of connected #GDrive<!-- -->s Returns: a new #GVfs handle. a new #GVfs handle. Ejects a volume. a #GVolume. flags affecting the unmount if required for eject optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. a #gpointer. Gets the mount path for a unix mount point. a #GUnixMountPoint. a string containing the mount path. Checks if an ouput stream has pending actions. a #GOutputStream. %TRUE if @stream has pending actions. Gets the base stream for the filter stream. a #GFilterOutputStream. a #GOutputStream. Compares two unix mounts. first #GUnixMountEntry to compare. second #GUnixMountEntry to compare. 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively. Gets the local #GVfs for the system. a #GVfs. 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. input #GFile. %TRUE if file is native. 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. input #GFile. a string containing the attribute's name. a #guint64 containing the attribute's new value. a #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. Finishes flushing an output stream. a #GOutputStream. a GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if flush operation suceeded, %FALSE otherwise. Checks if the @drive supports removable media. a #GDrive. %TRUE if @drive supports removable media, %FALSE otherwise. Gets the icon for @volume. a #GVolume. a #GIcon. Gets the attribute type, value and status for an attribute key. a #GFileInfo a file attribute key return location for the attribute type, or %NULL return location for the attribute value, or %NULL return location for the attribute status, or %NULL %TRUE if @info has an attribute named @attribute, %FALSE otherwise. Tests if the stream can be truncated. a #GSeekable. %TRUE if the stream can be truncated, %FALSE otherwise. Splices a stream asynchronously. When the operation is finished @callback will be called. You can then call g_output_stream_splice_finish() to get the result of the operation. For the synchronous, blocking version of this function, see g_output_stream_splice(). a #GOutputStream. a #GInputStream. a set of #GOutputStreamSpliceFlags. the io priority of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback. user data passed to @callback. The :newline-type property determines what is considered as a line ending when reading complete lines from the stream. Puts a byte into the output stream. a #GDataOutputStream. a #guchar. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Checks if the unix mounts have changed since a given unix time. guint64 to contain a timestamp. %TRUE if the mounts have changed since @time. 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. 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. a #GOutputStream. optional cancellable object location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE on error Gets a signed 64-bit integer contained within the attribute. If the attribute does not contain an signed 64-bit integer, or is invalid, 0 will be returned. a #GFileInfo. a file attribute key. a signed 64-bit integer from the attribute. Gets the name under which @extension was registered. Note that the same type may be registered as extension for multiple extension points, under different names. a #GIOExtension the name of @extension. Truncates a stream with a given #offset. 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 an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. a #GSeekable. a #goffset. optional #GCancellable object, %NULL to ignore. 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. 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 an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. #GBufferedInputStream. optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore. the byte read from the @stream, or -1 on end of stream or error. Finishes ejecting a drive. a #GDrive. a #GAsyncResult. a #GError. %TRUE if the drive has been ejected successfully, %FALSE otherwise. 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. input #GFile. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Gets the size of the input buffer. #GBufferedInputStream. the current buffer size. Reads the partial contents of a file. A #GFileReadMoreCallback should be used to stop reading from the file when appropriate, else this function will behave exactly as g_file_load_contents_async(). This operation can be finished by g_file_load_partial_contents_finish(). Users of this function should be aware that @user_data is passed to both the @read_more_callback and 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. input #GFile. optional #GCancellable object, %NULL to ignore. a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to the callback functions. Finishes an asynchronous stream splice operation. a #GOutputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. a #gssize of the number of bytes spliced. a string. a #GCancellable, or %NULL a #GMount for given @mount_path or %NULL. Obtains a completion for @initial_text from @completer. the filename completer. text to be completed. a completed string, or %NULL if no completion exists. This string is not owned by GIO, so remember to g_free() it when finished. Creates a new icon for a file. a #GFile. a #GIcon for the given @file, or %NULL on error. Gets a #GFile for @uri. This operation never fails, but the returned object might not support any I/O operation if the uri is malformed or if the uri type is not supported. a#GVfs. a string containing a URI path. a #GFile. Gets the default application for launching applications using this URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip". a string containing a URI scheme. #GAppInfo for given @uri_scheme or %NULL on error. Gets a #GFile for @path. a #GVfs. a string containing a VFS path. a #GFile. Finishes setting an attribute started in g_file_set_attributes_async(). input #GFile. a #GAsyncResult. a #GFileInfo. a #GError, or %NULL %TRUE if the attributes were set correctly, %FALSE otherwise. 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. input #GFile. flags affecting the operation optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied, or %NULL. the data to pass to callback function Guesses the name of a Unix mount point. The result is a translated string. a #GUnixMountPoint A newly allocated string that must be freed with g_free() Guesses whether a Unix mount point can be ejected. a #GUnixMountPoint %TRUE if @mount_point is deemed to be ejectable. Completes an asynchronous I/O job. a #GSimpleAsyncResult. Gets the icon for @drive. a #GDrive. #GIcon for the @drive. Finishes an async enumerate children operation. See g_file_enumerate_children_async(). input #GFile. a #GAsyncResult. a #GError. a #GFileEnumerator or %NULL if an error occurred. Frees a unix mount. a #GUnixMount. Checks if an input stream has pending actions. input stream. %TRUE if @stream has pending actions. Append a name to the list of icons from within @icon. a #GThemedIcon name of icon to append to list of icons from within @icon. Gets the value of a byte string attribute. If the attribute does not contain a byte string, %NULL will be returned. a #GFileInfo. a file attribute key. the contents of the @attribute value as a byte string, or %NULL otherwise. Creates a new buffered output stream with a given buffer size. a #GOutputStream. a #gsize. a #GOutputStream with an internal buffer set to @size. 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(). 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. a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. an unsigned 64-bit/8-byte read from @stream or %0 if an error occurred. Puts an unsigned 64-bit integer into the stream. a #GDataOutputStream. a #guint64. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Creates a hash value for a #GFile. This call does no blocking i/o. #gconstpointer to a #GFile. 0 if @file is not a valid #GFile, otherwise an integer that can be used as hash value for the #GFile. This function is intended for easily hashing a #GFile to add to a #GHashTable or similar data structure. Initializes the inotify backend. This must be called before any other functions in this module. #TRUE if initialization succeeded, #FALSE otherwise 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 %G_IO_ERROR_PENDING. Can fail if the stream was already closed (with @error being set to %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being set to %G_IO_ERROR_PENDING), or if querying info is not supported for the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In all cases of failure, %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 set, and %NULL will be returned. a #GFileOutputStream. a file attribute query string. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. a #GFileInfo for the @stream, or %NULL on error. Gets the type associated with @extension. a #GIOExtension the type of @extension Gets the top cancellable from the stack. a #GCancellable from the top of the stack, or %NULL if the stack is empty. 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 @source symlink will be copied. 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(). input #GFile. destination #GFile set of #GFileCopyFlags optional #GCancellable object, %NULL to ignore. function to callback with progress information user data to pass to @progress_callback #GError to set on error, or %NULL %TRUE on success, %FALSE otherwise. Puts a signed 32-bit integer into the output stream. a #GDataOutputStream. a #gint32. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Gets the byte order for the data input stream. a given #GDataInputStream. the @stream's current #GDataStreamByteOrder. 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. input #GFile. a string containing the attribute's name. a #guint64 containing the attribute's new value. a #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set, %FALSE otherwise. If @dirs_only is %TRUE, @completer will only complete directory names, and not file names. the filename completer. a #gboolean. Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). a #GFileEnumerator. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. a #GList of #GFileInfo<!---->s. You must free the list with g_list_free and unref the infos with g_object_unref when your done with them. Reports an error in an idle function. Similar to g_simple_async_report_error_in_idle(), but takes a #GError rather than building a new one. a #GObject. a #GAsyncReadyCallback. user data passed to @callback. the #GError to report Gets the name of @drive. a #GDrive. a string containing @drive's name. The returned string should be freed when no longer needed. Gets a list of the mounts on the system. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). a #GVolumeMonitor. a #GList of #GMount<!-- -->s Sets whether or not the @stream's buffer should automatically grow. If @auto_grow is true, then each write will just make the buffer larger, and you must manually flush the buffer to actually write out the data to the underlying stream. a #GBufferedOutputStream. a #gboolean. Gets the size of the loaded data from the @ostream. Note that the returned size may become invalid on the next write or truncate operation on the stream. a #GMemoryOutputStream the size of the stream's data Checks if a unix mount is a system path. a #GUnixMount. %TRUE if the unix mount is for a system path. Gets the file's content type. a #GFileInfo. a string containing the file's content type.s Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info. source to copy attributes from. destination to copy attributes to. Sets an error within the asynchronous result without a #GError. a #GSimpleAsyncResult. a #GQuark (usually #G_IO_ERROR). an error code. a formatted error reporting string. a list of variables to fill in @format. Gets the device path for a unix mount point. a #GUnixMountPoint. a string containing the device path. Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file info to the given time value. a #GFileInfo. a #GTimeVal. Removes all cases of @attribute from @info if it exists. a #GFileInfo. a file attribute key. Creates a new data input stream for the @base_stream. a #GInputStream. a new #GDataInputStream. Gets the executable's name for the installed application. a #GAppInfo. a string containing the @appinfo's application binary's name. Gets the value of a string attribute. If the attribute does not contain a string, %NULL will be returned. a #GFileInfo. a file attribute key. the contents of the @attribute value as a string, or %NULL otherwise. Compares two content types for equality. a content type string. a content type string. %TRUE if the two strings are identical or equivalent, %FALSE otherwise. Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info to the given size. a #GFileInfo. a #goffset containing the file's size. Finishes an asynchronous eject operation started by g_file_eject_mountable(). input #GFile. a #GAsyncResult. a #GError, or %NULL %TRUE if the @file was ejected successfully. %FALSE otherwise. 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. input #GFile. optional #GCancellable object, %NULL to ignore. a #GError. a #GMount where the @file is located or %NULL on error. Sets the application as the default handler for the given file extention. a #GAppInfo. a string containing the file extension (without the dot). a #GError. %TRUE on success, %FALSE on error. Tries to read @count bytes from the stream into the buffer starting at @buffer. Will block during this read. This function is similar to g_input_stream_read(), except it tries to read as many bytes as requested, only stopping on an error or end of stream. On a successful read of @count bytes, or if we reached the end of the stream, %TRUE is returned, and @bytes_read is set to the number of bytes read into @buffer. If there is an error during the operation %FALSE is returned and @error is set to indicate the error status, @bytes_read is updated to contain the number of bytes read into @buffer before the error occurred. 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 location to store the number of bytes that was read from the stream optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE if there was an error Finishes closing a stream asynchronously, started from g_input_stream_close_async(). a #GInputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if the stream was closed successfully. path name to monitor. #GFileMonitorFlags. a new #GFileMonitor for the given @pathname. Gets the volume for the @mount. a #GMount. a #GVolume or %NULL if @mount is not associated with a volume. Checks if the content type is the generic "unknown" type. On unix this is the "application/octet-stream" mimetype, while on win32 it is "*". a content type string. %TRUE if the type is the unknown type. Pops @cancellable off the cancellable stack (verifying that @cancellable is on the top of the stack). optional #GCancellable object, %NULL to ignore. Gets the source object from a #GAsyncResult. a #GAsyncResult. the source object for the @res. 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. input #GFile. an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore. %TRUE if a backup should be created. a set of #GFileCreateFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Sets the byte order of the data output stream to @order. a #GDataOutputStream. a %GDataStreamByteOrder. Lists the file info structure's attributes. a #GFileInfo. a file attribute key's namespace. a null-terminated array of strings of all of the possible attribute types for the given @name_space, or %NULL on error. Sets a default choice for the mount operation. a #GMountOperation. an integer. 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(). 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. a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. a signed 64-bit/8-byte value read from @stream or %0 if an error occurred. Polls @file for changes. a #GFile. a new #GFileMonitor for the given #GFile. Gets the UUID for the @mount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. a #GMount. the UUID for @mount or %NULL if no UUID can be computed. Finalizes the asynchronous query started by g_file_output_stream_query_info_async(). a #GFileOutputStream. a #GAsyncResult. a #GError, %NULL to ignore. A #GFileInfo for the finished query. Resolves a relative path for @file to an absolute path. This call does no blocking i/o. input #GFile. a given relative path string. #GFile to the resolved path. %NULL if @relative_path is %NULL or if @file is invalid. 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 %G_IO_ERROR_INVALID_ARGUMENT error. 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. 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 an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. 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. optional #GCancellable object, %NULL to ignore. 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(). 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. a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. a signed 32-bit/4-byte value read from the @stream or %0 if an error occurred. Sets the display name for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. a #GFileInfo. a string containing a display name. Finishes an asynchronous file append operation started with g_file_append_to_async(). input #GFile. #GAsyncResult a #GError, or %NULL a valid #GFileOutputStream or %NULL on error. Starts a @mount_operation, mounting the volume that contains the file @location. When this operation has completed, @callback will be called with @user_user data, and the operation can be finalized 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. input #GFile. flags affecting the operation a #GMountOperation or %NULL to avoid user interaction. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied, or %NULL. the data to pass to callback function Tests if the stream supports the #GSeekableIface. a #GSeekable. %TRUE if @seekable can be seeked. %FALSE otherwise. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. a #GObject. Returns: a #GFileOutputStream or %NULL on error. input #GFile. an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore. %TRUE if a backup should be created. a set of #GFileCreateFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GFileOutputStream or %NULL on error. Creates a new mount operation. a #GMountOperation. Creates a new file attribute matcher, which matches attributes against a given string. #GFileAttributeMatcher<!-- -->s are reference counted structures, and are created with a reference count of 1. If the number of references falls to 0, the #GFileAttributeMatcher is automatically destroyed. The @attribute string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace::key" strings may be concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). The wildcard "*" may be used to match all keys and namespaces, or "namespace::*" will match all keys in a given namespace. Examples of strings to use: <table> <title>File Attribute Matcher strings and results</title> <tgroup cols='2' align='left'><thead> <row><entry> Matcher String </entry><entry> Matches </entry></row></thead> <tbody> <row><entry>"*"</entry><entry>matches all attributes.</entry></row> <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row> <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and all keys in the unix namespace.</entry></row> </tbody></tgroup> </table> an attribute string to match. a #GFileAttributeMatcher. 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. input #GFile. a string containing the attribute's name. a string containing the attribute's value. #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the @attribute was successfully set, %FALSE otherwise. Loads all the modules in the specified directory. pathname for a directory containing modules to load. a list of #GIOModules loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free(). Gets a list of all extensions that implement this extension point. The list is sorted by priority, beginning with the highest priority. a #GIOExtensionPoint a #GList of #GIOExtension<!-- -->s. The list is owned by GIO and should not be modified Mounts a volume. a #GVolume. flags affecting the operation a #GMountOperation or %NULL to avoid user interaction. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. a #gpointer. Registers @type as extension for the extension point with name @extension_point_name. If @type has already been registered as an extension for this extension point, the existing #GIOExtension object is returned. the name of the extension point the #GType to register as extension the name for the extension the priority for the extension a #GIOExtension object for #GType Checks if a unix mount is mounted read only. a #GUnixMount. %TRUE if @mount_entry is read only. Finishes ejecting a volume. pointer to a #GVolume. a #GAsyncResult. a #GError. %TRUE, %FALSE if operation failed. Gets the attribute type for an attribute key. a #GFileInfo. a file attribute key. a #GFileAttributeType for the given @attribute, or %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is invalid. Gets the file attribute with the name @name from @list. a #GFileAttributeInfoList. the name of the attribute to lookup. a #GFileAttributeInfo for the @name, or %NULL if an attribute isn't found. Gets the ID of an application. An id is a string that identifies the application. The exact format of the id is platform dependent. For instance, on Unix this is the desktop file id from the xdg menu specification. Note that the returned ID may be %NULL, depending on how the @appinfo has been constructed. a #GAppInfo. a string containing the application's ID. The index of the user's choice when a question is asked during the mount operation. See the #GMountOperation::ask-question signal. 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. 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. input #GFile. a set of #GFileCreateFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GFileOutputStream for the newly created file, or %NULL on error. Appends @data to data that can be read from the input stream a #GMemoryInputStream input data length of the data, may be -1 if @data is a nul-terminated string function that is called to free @data, or %NULL Gets the human readable description of the content type. a content type string. a short description of the content type @type. 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. 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. input #GFile. optional #GCancellable object, %NULL to ignore. 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.. Puts a signed 64-bit integer into the stream. a #GDataOutputStream. a #gint64. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Closes the stream, releasing resources related to it. Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED. Closing a stream multiple times will not return an error. 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 return %G_IO_ERROR_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. 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. 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. optional 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 (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. 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. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. Finds a #GVolume object by it's UUID (see g_volume_get_uuid()) a #GVolumeMonitor. the UUID to look for a #GVolume or %NULL if no such volume is available. Launches the application. Passes @uris to the launched application as arguments, using the optional @launch_context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. To lauch the application without arguments pass a %NULL @uris list. Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this. a #GAppInfo. a #GList containing URIs to launch. a #GAppLaunchContext. a #GError. %TRUE on successful launch, %FALSE otherwise. Guesses the icon of a Unix mount. a #GUnixMountEntry a #GIcon Unsets a mask set by g_file_info_set_attribute_mask(), if one is set. #GFileInfo. Gets a gssize from the asynchronous result. a #GSimpleAsyncResult. a gssize returned from the asynchronous function. Sets the name attribute for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_NAME. a #GFileInfo. a string containing a name. 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. input #GFile. a set of #GFileCreateFlags. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Gets the default #GVfs for the system. a #GVfs. Finishes a mount operation. See g_file_mount_mountable() for details. Finish an asynchronous mount operation that was started with g_file_mount_mountable(). input #GFile. a #GAsyncResult. a #GError, or %NULL a #GFile or %NULL on error. Finishes poll_for_mediaing a drive. a #GDrive. a #GAsyncResult. a #GError. %TRUE if the drive has been poll_for_mediaed successfully, %FALSE otherwise. 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. a #GFile the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. a #GFileInfo. a #gboolean. Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files). a content type string. %TRUE if the file type corresponds to a type that can be executable, %FALSE otherwise. Reads a line from the data input stream. 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. a given #GDataInputStream. a #gsize to get the length of the data read in. optional #GCancellable object, %NULL to ignore. #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. Gets the value of a attribute, formated as a string. This escapes things as needed to make the string valid utf8. a #GFileInfo. a file attribute key. a UTF-8 string associated with the given @attribute. When you're done with the string it must be freed with g_free(). Sets @mask on @info to match specific attribute types. a #GFileInfo. a #GFileAttributeMatcher. Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_finish() with the @mount and #GAsyncResults data returned in the @callback. a #GMount. flags affecting the operation optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. user data passed to @callback. Returns: a #GAppInfo if the handle was found, %NULL if there were errors. a #GFile to open. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL a #GAppInfo if the handle was found, %NULL if there were errors. When you are done with it, release it with g_object_unref() Checks if the application accepts files as arguments. a #GAppInfo. %TRUE if the @appinfo supports files. Checks if a unix mount point is mountable by the user. a #GUnixMountPoint. %TRUE if the mount point is user mountable. Checks if the application supports reading files and directories from URIs. a #GAppInfo. %TRUE if the @appinfo supports URIs. Sets the icon for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_ICON. a #GFileInfo. a #GIcon. Gets the priority with which @extension was registered. a #GIOExtension the priority of @extension Queries the stream information asynchronously. When the operation is finished @callback will be called. You can then call g_file_input_stream_query_info_finish() to get the result of the operation. For the synchronous version of this function, see g_file_input_stream_query_info(). 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 set a #GFileInputStream. a file attribute query string. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Reads a string from the data input stream, up to the first occurrance of any of the stop characters. a given #GDataInputStream. characters to terminate the read. a #gsize to get the length of the data read in. optional #GCancellable object, %NULL to ignore. #GError for error reporting. a string with the data that was read before encountering any of the stop characters. Set @length to a #gsize to get the length of the string. This function will return %NULL on an error. Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id(). a #GAppLaunchContext. the startup notification id that was returned by g_app_launch_context_get_startup_notify_id(). Guesses whether a Unix mount can be ejected. a #GUnixMountEntry %TRUE if @mount_entry is deemed to be ejectable. Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as #GdkAppLaunchContext. a #GAppLaunchContext. Sets the operation result within the asynchronous result to a pointer. a #GSimpleAsyncResult. a pointer result from an asynchronous function. a #GDestroyNotify function. Sets the size of the internal buffer of @stream to @size, or to the size of the contents of the buffer. The buffer can never be resized smaller than its current contents. #GBufferedInputStream. a #gsize. Checks to see if a #GFile has a given URI scheme. This call does no blocking i/o. input #GFile. a string containing a URI scheme. %TRUE if #GFile's backend supports the given URI scheme, %FALSE if URI scheme is %NULL, not supported, or #GFile is invalid. Gets the device path for a unix mount. a #GUnixMount. a string containing the device path. Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink. See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. a #GFileInfo. a #gboolean. 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 %G_IO_ERROR_INVALID_ARGUMENT error. 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. 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 an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. 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 optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore Number of bytes read, or -1 on error Creates a new themed icon for @iconnames. an array of strings containing icon names. the number of elements in the @iconnames array. a new #GThemedIcon. Creates a new #GBufferedInputStream from the given @base_stream, with a buffer set to @size. a #GOutputStream. a #gsize. a #GInputStream. Converts errno.h error codes into GIO error codes. Error number as defined in errno.h. #GIOErrorEnum value for the given errno.h error number. Checks if @mount can be eject. a #GMount. %TRUE if the @mount can be ejected. 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. 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. input #GFile. an attribute query string. a set of #GFileQueryInfoFlags. optional #GCancellable object, %NULL to ignore. #GError for error reporting. A #GFileEnumerator if successful, %NULL on error. Clears the pending flag on @stream. output stream Gets the name for a file. a #GFileInfo. a string containing the file name. Check to see whether the mount operation is being used for an anonymous user. a #GMountOperation. %TRUE if mount operation is anonymous. Gets a pointer result as returned by the asynchronous function. a #GSimpleAsyncResult. a pointer from the result. Used from an I/O job to send a callback to be run in the main loop (main thread), waiting for the result (and thus blocking the I/O job). a #GIOSchedulerJob a #GSourceFunc callback that will be called in the main thread data to pass to @func a #GDestroyNotify for @user_data, or %NULL The return value of @func Gets the filesystem type for the unix mount. a #GUnixMount. a string containing the file system type. 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(). 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. a given #GDataInputStream. optional #GCancellable object, %NULL to ignore. #GError for error reporting. an unsigned 32-bit/4-byte value read from the @stream or %0 if an error occurred. Gets the UUID for the @volume. The reference is typically based on the file system UUID for the volume in question and should be considered an opaque string. Returns %NULL if there is no UUID available. a #GVolume. the UUID for @volume or %NULL if no UUID can be computed. Creates a #GSimpleAsyncResult. a #GObject the asynchronous function was called with. a #GAsyncReadyCallback. user data passed to @callback. the asynchronous function. a #GSimpleAsyncResult. Gets the mime-type for the content type. If one is registered a content type string. the registered mime-type for the given @type, or NULL if unknown. Emits the #GFileMonitor::changed signal if a change has taken place. Should be called from file monitor implementations only. The signal will be emitted from an idle handler. a #GFileMonitor. a #GFile. a #GFile. a set of #GFileMonitorEvent flags. Finishes copying the file started with g_file_copy_async(). input #GFile. a #GAsyncResult. a #GError, or %NULL a %TRUE on success, %FALSE on error. Gets the name of @mount. a #GMount. the name for the given @mount. The returned string should be freed when no longer needed. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. a boolean value. Gets the URI scheme for a #GFile. RFC 3986 decodes the scheme as: <programlisting> URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] </programlisting> Common schemes include "file", "http", "ftp", etc. This call does no blocking i/o. input #GFile. a string containing the URI scheme for the given #GFile. The returned string should be freed with g_free() when no longer needed. Checks if the application info should be shown in menus that list available applications. a #GAppInfo. %TRUE if the @appinfo should be shown, %FALSE otherwise. Checks if an attribute will be matched by an attribute matcher. If the matcher was created with the "*" matching string, this function will always return %TRUE. a #GFileAttributeMatcher. a file attribute key. %TRUE if @attribute matches @matcher. %FALSE otherwise. Gets a list of all of the applications currently registered on this system. For desktop files, this includes applications that have <literal>NoDisplay=true</literal> set or are excluded from display by means of <literal>OnlyShowIn</literal> or <literal>NotShowIn</literal>. See g_app_info_should_show(). The returned list does not include applications which have the <literal>Hidden</literal> key set. a newly allocated #GList of references to #GAppInfo<!---->s. Gets an unsigned 32-bit integer contained within the attribute. If the attribute does not contain an unsigned 32-bit integer, or is invalid, 0 will be returned. a #GFileInfo. a file attribute key. an unsigned 32-bit integer from the attribute. 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. input #GFile. string containing the #GFile's base name, or %NULL if given #GFile is invalid. The returned string should be freed with g_free() when no longer needed. Gets the drive for the @volume. a #GVolume. a #GDrive or %NULL if @volume is not associated with a drive. Gets the default application for launching applications using this URI scheme for a particular GDesktopAppInfoLookup implementation. The GDesktopAppInfoLookup interface and this function is used to implement g_app_info_get_default_for_uri_scheme() backends in a GIO module. There is no reason for applications to use it directly. Applications should use g_app_info_get_default_for_uri_scheme(). a #GDesktopAppInfoLookup a string containing a URI scheme. #GAppInfo for given @uri_scheme or %NULL on error. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. a signed 32-bit integer Checks if the buffer automatically grows as data is added. a #GBufferedOutputStream. %TRUE if the @stream's buffer automatically grows, %FALSE otherwise. Will set @cancellable to cancelled, and will emit the CANCELLED signal. This function is thread-safe. In other words, you can safely call it from another thread than the one running an operation that was passed the @cancellable. a #GCancellable object. Gets the next matched attribute from a #GFileAttributeMatcher. a #GFileAttributeMatcher. a string containing the next attribute or %NULL if no more attribute exist. Closes the stream, releasing resources related to it. Once the stream is closed, all other operations will return %G_IO_ERROR_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 return %G_IO_ERROR_CLOSED for all operations. Still, it is important to check and report the error to the user. 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. 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. optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE on failure 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. input #GFile. flags affecting the operation a #GMountOperation, or %NULL to avoid user interaction. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied, or %NULL. the data to pass to callback function Reads data into @stream's buffer asynchronously, up to @count size. @io_priority can be used to prioritize reads. For the synchronous version of this function, see g_buffered_input_stream_fill(). #GBufferedInputStream. a #gssize. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object a #GAsyncReadyCallback. a #gpointer. Releases all resources used by this enumerator, making the enumerator return %G_IO_ERROR_CLOSED on all calls. This will be automatically called when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. a #GFileEnumerator. optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore #TRUE on success or #FALSE on error. Checks if two icons are equal. pointer to the first #GIcon. pointer to the second #GIcon. %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. Returns: %TRUE if the volume should be automatically mounted. a #GVolume %TRUE if the volume should be automatically mounted. Gets any loaded data from the @ostream. Note that the returned pointer may become invalid on the next write or truncate operation on the stream. a #GMemoryOutputStream pointer to the stream's data Gets the mount path for a unix mount. input #GUnixMountEntry to get the mount path for. the mount path for @mount_entry. Splices an input stream into an output stream. a #GOutputStream. a #GInputStream. a set of #GOutputStreamSpliceFlags. optional #GCancellable object, %NULL to ignore. a #GError location to store the error occuring, or %NULL to ignore. a #gssize containing the size of the data spliced. Sets the @attribute to contain the given @attr_value, if possible. a #GFileInfo. a file attribute key. an unsigned 64-bit integer. Gets the kinds of <link linkend="volume-identifier">identifiers</link> that @volume has. Use g_volume_get_identifer() to obtain the identifiers themselves. a #GVolume a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() to free. Gets a #GList of strings containing the unix mount points. If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mounts_points_changed_since(). guint64 to contain a timestamp. a #GList of the UNIX mountpoints. Removes a reference from the given @list. If the reference count falls to zero, the @list is deleted. The #GFileAttributeInfoList to unreference. Request an asynchronous skip of @count bytes from the stream into the buffer starting at @buffer. When the operation is finished @callback will be called. You can then call g_input_stream_skip_finish() to get the result of the operation. During an async request no other sync and async calls are allowed, and will result in %G_IO_ERROR_PENDING errors. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. On success, the number of bytes skipped will be passed to the callback. 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, but generally we try to skip as many bytes as requested. Zero is returned on end of file (or if @count is zero), but never otherwise. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. A #GInputStream. the number of bytes that will be skipped from the stream the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if @path is malformed. a string containing a relative or absolute path. a new #GFile for the given @path. 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. mtime). However if #G_FILE_COPY_ALL_METADATA is specified in @flags, then all the metadata that is possible to copy is copied. a #GFile with attributes. a #GFile to copy attributes to. a set of #GFileCopyFlags. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if the attributes were copied successfully, %FALSE otherwise. 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 existance and then execute something based on the outcome of that, because the file might have been created or removed inbetween 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 g_file_create() which will either atomically create the file or fail with a G_IO_ERROR_EXISTS error. However, in many cases an existance 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). Gets a reference to the class for the type that is associated with @extension. a #GIOExtension the #GTypeClass for the type of @extension Gets the #GAppInfo that correspond to a given content type. the content type to find a #GAppInfo for if %TRUE, the #GAppInfo is expected to support URIs #GAppInfo for given @content_type or %NULL on error. 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). 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. input #GFile. an attribute query string. optional #GCancellable object, %NULL to ignore. a #GError. a #GFileInfo or %NULL if there was an error. Remounts a mount. This is an asynchronous operation, and is finished by calling g_mount_remount_finish() with the @mount and #GAsyncResults data returned in the @callback. Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted. a #GMount. flags affecting the operation a #GMountOperation or %NULL to avoid user interaction. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback, or %NULL. user data passed to @callback. Finishes an asynchronous file read operation started with g_file_read_async(). input #GFile. a #GAsyncResult. a #GError, or %NULL a #GFileInputStream or %NULL on error. Gets the symlink target for a given #GFileInfo. a #GFileInfo. a string containing the symlink target. Runs the asynchronous job in a separated thread. a #GSimpleAsyncResult. a #GSimpleAsyncThreadFunc. the io priority of the request. optional #GCancellable object, %NULL to ignore. Finishes an asynchronous partial load operation that was started with g_file_load_partial_contents_async(). input #GFile. a #GAsyncResult. 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 load was successful. If %FALSE and @error is present, it will be set appropriately. 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 %G_IO_ERROR_INVALID_ARGUMENT error. 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). 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 an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. a #GOutputStream. the buffer containing the data to write. the number of bytes to write optional cancellable object location to store the error occuring, or %NULL to ignore Number of bytes written, or -1 on error Tries to write @count bytes from @buffer into the stream. Will block during the operation. This function is similar to g_output_stream_write(), except it tries to write as many bytes as requested, only stopping on an error. On a successful write of @count bytes, %TRUE is returned, and @bytes_written is set to @count. If there is an error during the operation FALSE is returned and @error is set to indicate the error status, @bytes_written is updated to contain the number of bytes written into the stream before the error occurred. a #GOutputStream. the buffer containing the data to write. the number of bytes to write location to store the number of bytes that was written to the stream optional #GCancellable object, %NULL to ignore. location to store the error occuring, or %NULL to ignore %TRUE on success, %FALSE if there was an error Gets a list of URI schemes supported by @vfs. a #GVfs. a list of strings. 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. input #GFile. a set of #GFileMonitorFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL. a #GFileMonitor for the given @file. Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing. a #GFileOutputStream. the entity tag for the stream. 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 @source symlink will be copied. 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). #GFile pointing to the source location. #GFile pointing to the destination location. set of #GFileCopyFlags. optional #GCancellable object, %NULL to ignore. #GFileProgressCallback function for updates. gpointer to user data for the callback function. #GError for returning error conditions, or %NULL %TRUE on successful move, %FALSE otherwise. Creates a new buffered output stream for a base stream. a #GOutputStream. a #GOutputStream for the given @base_stream. Gets the edit name for a file. a #GFileInfo. a string containing the edit name. 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. 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. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL %TRUE if the attribute was set, %FALSE otherwise. Asynchronously closes the file enumerator. 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 g_file_enumerator_close_finish(). a #GFileEnumerator. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Checks if a unix mount point is read only. a #GUnixMountPoint. %TRUE if a mount point is read only. 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. #GFile to read. a #GCancellable a #GError, or %NULL #GFileInputStream or %NULL on error. Creates a duplicate of a #GAppInfo. a #GAppInfo. a duplicate of @appinfo. Propagates an error from within the simple asynchronous result to a given destination. a #GSimpleAsyncResult. a location to propegate the error to. %TRUE if the error was propegated to @dest. %FALSE otherwise. Gets the display string for the display. This is used to ensure new applications are started on the same display as the launching application. a #GAppLaunchContext. a #GAppInfo. a #GList of files. a display string for the display. A desktop file is hidden if the Hidden key in it is set to True. a #GDesktopAppInfo. %TRUE if hidden, %FALSE otherwise. filename of the file to create. new local #GFile. Puts a string into the output stream. a #GDataOutputStream. a string. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @string was successfully added to the @stream. 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. a #GVfs. a string to be parsed by the VFS module. a #GFile for the given @parse_name. Checks if the VFS is active. a #GVfs. %TRUE if construction of the @vfs was successful and it is now active. Registers an extension point. The name of the extension point the new #GIOExtensionPoint. This object is owned by GIO and should not be freed Creates a #GSimpleAsyncResult from an error condition. a #GObject. a #GAsyncReadyCallback. user data passed to @callback. a #GError location. a #GSimpleAsyncResult. Request an asynchronous read of @count bytes from the stream into the buffer starting at @buffer. When the operation is finished @callback will be called. You can then call g_input_stream_read_finish() to get the result of the operation. During an async request no other sync and async calls are allowed, and will result in %G_IO_ERROR_PENDING errors. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. On success, the number of bytes read into the buffer will be passed to the callback. 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, but generally we try to read as many bytes as requested. Zero is returned on end of file (or if @count is zero), but never otherwise. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. 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 the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Gets the value of the sort_order attribute from the #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. a #GFileInfo. a #gint32 containing the value of the "standard::sort_order" attribute. Creates a new themed icon for @iconname. a string containing an icon name. a new #GThemedIcon. 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. If @etag_out is present, it will be set to the new entity tag for the @file. input #GFile. a #GAsyncResult. 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 load was successful. If %FALSE and @error is present, it will be set appropriately. Finishes an asynchronous stream read operation. a #GInputStream. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. number of bytes read in, or -1 on error. 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. input #GFile. a #GAsyncResult. a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed. a #GError, or %NULL %TRUE on success, %FALSE on failure. Tells the current position within the stream. a #GSeekable. the offset from the beginning of the buffer. Gets the size of the available data within the stream. #GBufferedInputStream. size of the available stream. Creates a new #GMemoryOutputStream. If @data is non-%NULL, the stream will use that for its internal storage. If @realloc_fn is non-%NULL, it will be used for resizing the internal storage when necessary. To construct a fixed-size output stream, pass %NULL as @realloc_fn. |[ /* a stream that can grow */ stream = g_memory_output_stream_new (NULL, 0, realloc, free); /* a fixed-size stream */ data = malloc (200); stream2 = g_memory_output_stream_new (data, 200, NULL, free); ]| pointer to a chunk of memory to use, or %NULL the size of @data a function with realloc() semantics to be called when @data needs to be grown, or %NULL a function to be called on @data when the stream is finalized, or %NULL A newly created #GMemoryOutputStream object. Gets a display name for a file. a #GFileInfo. a string containing the display name. #GUnixVolume for the given @mount_path. 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. input #GFile. a set of #GFileMonitorFlags. optional #GCancellable object, %NULL to ignore. a #GError, or %NULL. a #GFileMonitor for the given @file, or %NULL on error. 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. input #GFile. #GFile that is a duplicate of the given #GFile. Sets the size of the internal buffer to @size. a #GBufferedOutputStream. a #gsize. Checks if the unix mount points have changed since a given unix time. guint64 to contain a timestamp. %TRUE if the mount points have changed since @time. Starts an asynchronous replacement of @file with the given @contents of @length bytes. @etag will replace the document's current entity tag. When this operation has completed, @callback will be called with @user_user data, and the operation can be finalized 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. input #GFile. string of contents to replace the file with. the length of @contents in bytes. a new <link linkend="gfile-etag">entity tag</link> for the @file. %TRUE if a backup should be created. a set of #GFileCreateFlags. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Finishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. a #GMount. a #GAsyncResult. a #GError location to store the error occuring, or %NULL to ignore. %TRUE if the mount was successfully unmounted. %FALSE otherwise. Gets the size of the buffer in the @stream. a #GBufferedOutputStream. the current size of the buffer. Gets a hash for an icon. #gconstpointer to an icon object. a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure. Gets the value of a #GObject attribute. If the attribute does not contain a #GObject, %NULL will be returned. a #GFileInfo. a file attribute key. a #GObject associated with the given @attribute, or %NULL otherwise. References a file attribute matcher. a #GFileAttributeMatcher. a #GFileAttributeMatcher. Emitted when the file name completion information comes available. Finishes an asynchronous file replace operation started with g_file_replace_async(). input #GFile. a #GAsyncResult. a #GError, or %NULL a #GFileOutputStream, or %NULL on error. Creates a new file info structure. a #GFileInfo. Creates a new unix output stream for @fd. If @close_fd_at_close is %TRUE, the fd will be closed when the output stream is destroyed. unix's file descriptor. a #gboolean. #GOutputStream. If @close_fd_at_close is %TRUE, then @fd will be closed when the #GOutputStream is closed. Puts an unsigned 16-bit integer into the output stream. a #GDataOutputStream. a #guint16. optional #GCancellable object, %NULL to ignore. a #GError, %NULL to ignore. %TRUE if @data was successfully added to the @stream. Creates a new #GSimpleAsyncResult with a set error. a #GObject. a #GAsyncReadyCallback. user data passed to @callback. a #GQuark. an error code. a string with format characters. a list of values to insert into @format. a #GSimpleAsyncResult. Gets a list of all #GAppInfo s for a given content type. the content type to find a #GAppInfo for #GList of #GAppInfo s for given @content_type or %NULL on error. Asynchronously sets the display name for a given #GFile. For more details, see g_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. input #GFile. a string. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function Finishes an unmount operation, see g_file_unmount_mountable() for details. Finish an asynchronous unmount operation that was started with g_file_unmount_mountable(). input #GFile. a #GAsyncResult. a #GError, or %NULL %TRUE if the operation finished successfully. %FALSE otherwise. Gets a unsigned 64-bit integer contained within the attribute. If the attribute does not contain an unsigned 64-bit integer, or is invalid, 0 will be returned. a #GFileInfo. a file attribute key. a unsigned 64-bit integer from the attribute. Checks if a supported content type can be removed from an application. a #GAppInfo. %TRUE if it is possible to remove supported content types from a given @appinfo, %FALSE if not. Gets the modification time of the current @info and sets it in @result. a #GFileInfo. a #GTimeVal. Gets the URI for the @file. This call does no blocking i/o. input #GFile. a string containing the #GFile's URI. The returned string should be freed with g_free() when no longer needed. Sets the user name within @op to @username. a #GMountOperation. input username. Determines if @type is a subset of @supertype. a content type string. a string. %TRUE if @type is a kind of @supertype, %FALSE otherwise. 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. input #GFile. an attribute query string. the <link linkend="io-priority">I/O priority</link> of the request. optional #GCancellable object, %NULL to ignore. a #GAsyncReadyCallback to call when the request is satisfied the data to pass to callback function