File

Undocumented in source.

Constructors

this
this(GFile* gFile, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getFileStruct
GFile* getFileStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin FileT!(GFile)
Undocumented in source.

Variables

gFile
GFile* gFile;

the main Gtk struct

Inherited Members

From ObjectG

gObject
GObject* gObject;

the main Gtk struct

getObjectGStruct
GObject* getObjectGStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

isGcRoot
bool isGcRoot;
Undocumented in source.
destroyNotify
void destroyNotify(ObjectG obj)
Undocumented in source. Be warned that the author may not have intended to support it.
toggleNotify
void toggleNotify(ObjectG obj, GObject* object, int isLastRef)
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()
Undocumented in source.
getDObject
RT getDObject(U obj, bool ownedRef)

Gets a D Object from the objects table of associations.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setProperty
void setProperty(string propertyName, int value)
setProperty
void setProperty(string propertyName, string value)
setProperty
void setProperty(string propertyName, long value)
setProperty
void setProperty(string propertyName, ulong value)
unref
deprecated void unref(ObjectG obj)
Undocumented in source. Be warned that the author may not have intended to support it.
doref
deprecated ObjectG doref(ObjectG obj)
Undocumented in source. Be warned that the author may not have intended to support it.
connectedSignals
int[string] connectedSignals;
Undocumented in source.
onNotifyListeners
void delegate(ParamSpec, ObjectG)[] onNotifyListeners;
Undocumented in source.
addOnNotify
void addOnNotify(void delegate(ParamSpec, ObjectG) dlg, string property, ConnectFlags connectFlags)

The notify signal is emitted on an object when one of its properties has been changed. Note that getting this signal doesn't guarantee that the value of the property has actually changed, it may also be emitted when the setter for the property is called to reinstate the previous value.

callBackNotify
void callBackNotify(GObject* gobjectStruct, GParamSpec* pspec, ObjectG _objectG)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
compatControl
size_t compatControl(size_t what, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
interfaceFindProperty
ParamSpec interfaceFindProperty(void* gIface, string propertyName)

Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as @g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

interfaceInstallProperty
void interfaceInstallProperty(void* gIface, ParamSpec pspec)

Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

interfaceListProperties
ParamSpec[] interfaceListProperties(void* gIface)

Lists the properties of an interface.Generally, the interface vtable passed in as @g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

addToggleRef
void addToggleRef(GToggleNotify notify, void* data)

Increases the reference count of the object by one and sets a callback to be called when all other references to the object are dropped, or when this is already the last reference to the object and another reference is established.

addWeakPointer
void addWeakPointer(void* weakPointerLocation)

Adds a weak reference from weak_pointer to @object to indicate that the pointer located at @weak_pointer_location is only valid during the lifetime of @object. When the @object is finalized, @weak_pointer will be set to %NULL.

bindProperty
Binding bindProperty(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags)

Creates a binding between @source_property on @source and @target_property on @target. Whenever the @source_property is changed the @target_property is updated using the same value. For instance:

bindPropertyFull
Binding bindPropertyFull(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, GBindingTransformFunc transformTo, GBindingTransformFunc transformFrom, void* userData, GDestroyNotify notify)

Complete version of g_object_bind_property().

bindPropertyWithClosures
Binding bindPropertyWithClosures(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, Closure transformTo, Closure transformFrom)

Creates a binding between @source_property on @source and @target_property on @target, allowing you to set the transformation functions to be used by the binding.

dupData
void* dupData(string key, GDuplicateFunc dupFunc, void* userData)

This is a variant of g_object_get_data() which returns a 'duplicate' of the value. @dup_func defines the meaning of 'duplicate' in this context, it could e.g. take a reference on a ref-counted object.

dupQdata
void* dupQdata(GQuark quark, GDuplicateFunc dupFunc, void* userData)

This is a variant of g_object_get_qdata() which returns a 'duplicate' of the value. @dup_func defines the meaning of 'duplicate' in this context, it could e.g. take a reference on a ref-counted object.

forceFloating
void forceFloating()

This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

freezeNotify
void freezeNotify()

Increases the freeze count on @object. If the freeze count is non-zero, the emission of "notify" signals on @object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

getData
void* getData(string key)

Gets a named field from the objects table of associations (see g_object_set_data()).

getProperty
void getProperty(string propertyName, Value value)

Gets a property of an object. @value must have been initialized to the expected type of the property (or a type to which the expected type can be transformed) using g_value_init().

getQdata
void* getQdata(GQuark quark)

This function gets back user data pointers stored via g_object_set_qdata().

getValist
void getValist(string firstPropertyName, void* varArgs)

Gets properties of an object.

isFloating
bool isFloating()

Checks whether @object has a floating[floating-ref] reference.

notify
void notify(string propertyName)

Emits a "notify" signal for the property @property_name on @object.

notifyByPspec
void notifyByPspec(ParamSpec pspec)

Emits a "notify" signal for the property specified by @pspec on @object.

doref
ObjectG doref()

Increases the reference count of @object.

refSink
ObjectG refSink()

Increase the reference count of @object, and possibly remove the floating[floating-ref] reference, if @object has a floating reference.

removeToggleRef
void removeToggleRef(GToggleNotify notify, void* data)

Removes a reference added with g_object_add_toggle_ref(). The reference count of the object is decreased by one.

removeWeakPointer
void removeWeakPointer(void* weakPointerLocation)

Removes a weak reference from @object that was previously added using g_object_add_weak_pointer(). The @weak_pointer_location has to match the one used with g_object_add_weak_pointer().

replaceData
bool replaceData(string key, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy)

Compares the user data for the key @key on @object with @oldval, and if they are the same, replaces @oldval with @newval.

replaceQdata
bool replaceQdata(GQuark quark, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy)

Compares the user data for the key @quark on @object with @oldval, and if they are the same, replaces @oldval with @newval.

runDispose
void runDispose()

Releases all references to other objects. This can be used to break reference cycles.

setData
void setData(string key, void* data)

Each object carries around a table of associations from strings to pointers. This function lets you set an association.

setDataFull
void setDataFull(string key, void* data, GDestroyNotify destroy)

Like g_object_set_data() except it adds notification for when the association is destroyed, either by setting it to a different value or when the object is destroyed.

setProperty
void setProperty(string propertyName, Value value)

Sets a property on an object.

setQdata
void setQdata(GQuark quark, void* data)

This sets an opaque, named pointer on an object. The name is specified through a #GQuark (retrived e.g. via g_quark_from_static_string()), and the pointer can be gotten back from the @object with g_object_get_qdata() until the @object is finalized. Setting a previously set user data pointer, overrides (frees) the old pointer set, using #NULL as pointer essentially removes the data stored.

setQdataFull
void setQdataFull(GQuark quark, void* data, GDestroyNotify destroy)

This function works like g_object_set_qdata(), but in addition, a void (*destroy) (gpointer) function may be specified which is called with @data as argument when the @object is finalized, or the data is being overwritten by a call to g_object_set_qdata() with the same @quark.

setValist
void setValist(string firstPropertyName, void* varArgs)

Sets properties on an object.

stealData
void* stealData(string key)

Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

stealQdata
void* stealQdata(GQuark quark)

This function gets back user data pointers stored via g_object_set_qdata() and removes the @data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example: |[<!-- language="C" --> void object_add_to_user_list (GObject *object, const gchar *new_string) { // the quark, naming the object data GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); // retrive the old string list GList *list = g_object_steal_qdata (object, quark_string_list);

thawNotify
void thawNotify()

Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on @object and when it reaches zero, queued "notify" signals are emitted.

unref
void unref()

Decreases the reference count of @object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

watchClosure
void watchClosure(Closure closure)

This function essentially limits the life time of the @closure to the life time of the object. That is, when the object is finalized, the @closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the @closure, to ensure that an extra reference count is held on @object during invocation of the @closure. Usually, this function will be called on closures that use this @object as closure data.

weakRef
void weakRef(GWeakNotify notify, void* data)

Adds a weak reference callback to an object. Weak references are used for notification when an object is finalized. They are called "weak references" because they allow you to safely hold a pointer to an object without calling g_object_ref() (g_object_ref() adds a strong reference, that is, forces the object to stay alive).

weakUnref
void weakUnref(GWeakNotify notify, void* data)

Removes a weak reference callback to an object.

clearObject
void clearObject(ObjectG objectPtr)

Clears a reference to a #GObject.

From FileIF

getFileStruct
GFile* getFileStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

parseName
FileIF parseName(string parseName)

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.

appendTo
FileOutputStream appendTo(GFileCreateFlags flags, Cancellable cancellable)

Gets an output stream for appending data to the file. If the file doesn't already exist it is created.

appendToAsync
void appendToAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously opens @file for appending.

appendToFinish
FileOutputStream appendToFinish(AsyncResultIF res)

Finishes an asynchronous file append operation started with g_file_append_to_async().

copy
bool copy(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData)

Copies the file @source to the location specified by @destination. Can not handle recursive copies of directories.

copyAsync
void copyAsync(FileIF destination, GFileCopyFlags flags, int ioPriority, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData)

Copies the file @source to the location specified by @destination asynchronously. For details of the behaviour, see g_file_copy().

copyAttributes
bool copyAttributes(FileIF destination, GFileCopyFlags flags, Cancellable cancellable)

Copies the file attributes from @source to @destination.

copyFinish
bool copyFinish(AsyncResultIF res)

Finishes copying the file started with g_file_copy_async().

create
FileOutputStream create(GFileCreateFlags flags, Cancellable cancellable)

Creates a new file and returns an output stream for writing to it. The file must not already exist.

createAsync
void createAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously creates a new file and returns an output stream for writing to it. The file must not already exist.

createFinish
FileOutputStream createFinish(AsyncResultIF res)

Finishes an asynchronous file create operation started with g_file_create_async().

createReadwrite
FileIOStream createReadwrite(GFileCreateFlags flags, Cancellable cancellable)

Creates a new file and returns a stream for reading and writing to it. The file must not already exist.

createReadwriteAsync
void createReadwriteAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously creates a new file and returns a stream for reading and writing to it. The file must not already exist.

createReadwriteFinish
FileIOStream createReadwriteFinish(AsyncResultIF res)

Finishes an asynchronous file create operation started with g_file_create_readwrite_async().

delet
bool delet(Cancellable cancellable)

Deletes a file. If the @file is a directory, it will only be deleted if it is empty. This has the same semantics as g_unlink().

deleteAsync
void deleteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously delete a file. If the @file is a directory, it will only be deleted if it is empty. This has the same semantics as g_unlink().

deleteFinish
bool deleteFinish(AsyncResultIF result)

Finishes deleting a file started with g_file_delete_async().

dup
FileIF dup()

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.

ejectMountable
void ejectMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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().

ejectMountableFinish
bool ejectMountableFinish(AsyncResultIF result)

Finishes an asynchronous eject operation started by g_file_eject_mountable().

ejectMountableWithOperation
void ejectMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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_with_operation_finish().

ejectMountableWithOperationFinish
bool ejectMountableWithOperationFinish(AsyncResultIF result)

Finishes an asynchronous eject operation started by g_file_eject_mountable_with_operation().

enumerateChildren
FileEnumerator enumerateChildren(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable)

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.

enumerateChildrenAsync
void enumerateChildrenAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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.

enumerateChildrenFinish
FileEnumerator enumerateChildrenFinish(AsyncResultIF res)

Finishes an async enumerate children operation. See g_file_enumerate_children_async().

equal
bool equal(FileIF file2)

Checks equality of two given #GFiles.

findEnclosingMount
MountIF findEnclosingMount(Cancellable cancellable)

Gets a #GMount for the #GFile.

findEnclosingMountAsync
void findEnclosingMountAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously gets the mount for the file.

findEnclosingMountFinish
MountIF findEnclosingMountFinish(AsyncResultIF res)

Finishes an asynchronous find mount request. See g_file_find_enclosing_mount_async().

getBasename
string getBasename()

Gets the base name (the last component of the path) for a given #GFile.

getChild
FileIF getChild(string name)

Gets a child of @file with basename equal to @name.

getChildForDisplayName
FileIF getChildForDisplayName(string displayName)

Gets the child of @file for a given @display_name (i.e. a UTF-8 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.

getParent
FileIF getParent()

Gets the parent directory for the @file. If the @file represents the root directory of the file system, then %NULL will be returned.

getParseName
string getParseName()

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().

getPath
string getPath()

Gets the local pathname for #GFile, if one exists.

getRelativePath
string getRelativePath(FileIF descendant)

Gets the path for @descendant relative to @parent.

getUri
string getUri()

Gets the URI for the @file.

getUriScheme
string getUriScheme()

Gets the URI scheme for a #GFile. RFC 3986 decodes the scheme as: |[ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] ]| Common schemes include "file", "http", "ftp", etc.

hasParent
bool hasParent(FileIF parent)

Checks if @file has a parent, and optionally, if it is @parent.

hasPrefix
bool hasPrefix(FileIF prefix)

Checks whether @file has the prefix specified by @prefix.

hasUriScheme
bool hasUriScheme(string uriScheme)

Checks to see if a #GFile has a given URI scheme.

hash
uint hash()

Creates a hash value for a #GFile.

isNative
bool isNative()

Checks to see if a file is native to the platform.

loadContents
bool loadContents(Cancellable cancellable, string contents, string etagOut)

Loads the content of the file into memory. The data is always zero-terminated, but this is not included in the resultant @length. The returned @content should be freed with g_free() when no longer needed.

loadContentsAsync
void loadContentsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Starts an asynchronous load of the @file's contents.

loadContentsFinish
bool loadContentsFinish(AsyncResultIF res, string contents, string etagOut)

Finishes an asynchronous load of the @file's contents. The contents are placed in @contents, and @length is set to the size of the @contents string. The @content should be freed with g_free() when no longer needed. If @etag_out is present, it will be set to the new entity tag for the @file.

loadPartialContentsAsync
void loadPartialContentsAsync(Cancellable cancellable, GFileReadMoreCallback readMoreCallback, GAsyncReadyCallback callback, void* userData)

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().

loadPartialContentsFinish
bool loadPartialContentsFinish(AsyncResultIF res, string contents, string etagOut)

Finishes an asynchronous partial load operation that was started with g_file_load_partial_contents_async(). The data is always zero-terminated, but this is not included in the resultant @length. The returned @content should be freed with g_free() when no longer needed.

makeDirectory
bool makeDirectory(Cancellable cancellable)

Creates a directory. Note that this will only create a child directory of the immediate parent directory of the path or URI given by the #GFile. To recursively create directories, see g_file_make_directory_with_parents(). This function will fail if the parent directory does not exist, setting @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating directories, this function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.

makeDirectoryAsync
void makeDirectoryAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously creates a directory.

makeDirectoryFinish
bool makeDirectoryFinish(AsyncResultIF result)

Finishes an asynchronous directory creation, started with g_file_make_directory_async().

makeDirectoryWithParents
bool makeDirectoryWithParents(Cancellable cancellable)

Creates a directory and any parent directories that may not exist similar to 'mkdir -p'. If the file system does not support creating directories, this function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike the similar g_mkdir_with_parents().

makeSymbolicLink
bool makeSymbolicLink(string symlinkValue, Cancellable cancellable)

Creates a symbolic link named @file which contains the string @symlink_value.

measureDiskUsage
bool measureDiskUsage(GFileMeasureFlags flags, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, ulong diskUsage, ulong numDirs, ulong numFiles)

Recursively measures the disk usage of @file.

measureDiskUsageAsync
void measureDiskUsageAsync(GFileMeasureFlags flags, int ioPriority, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, GAsyncReadyCallback callback, void* userData)

Recursively measures the disk usage of @file.

measureDiskUsageFinish
bool measureDiskUsageFinish(AsyncResultIF result, ulong diskUsage, ulong numDirs, ulong numFiles)

Collects the results from an earlier call to g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for more information.

monitor
FileMonitor monitor(GFileMonitorFlags flags, Cancellable cancellable)

Obtains a file or directory monitor for the given file, depending on the type of the file.

monitorDirectory
FileMonitor monitorDirectory(GFileMonitorFlags flags, Cancellable cancellable)

Obtains a directory monitor for the given file. This may fail if directory monitoring is not supported.

monitorFile
FileMonitor monitorFile(GFileMonitorFlags flags, Cancellable cancellable)

Obtains a file monitor for the given file. If no file notification mechanism exists, then regular polling of the file is used.

mountEnclosingVolume
void mountEnclosingVolume(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Starts a @mount_operation, mounting the volume that contains the file @location.

mountEnclosingVolumeFinish
bool mountEnclosingVolumeFinish(AsyncResultIF result)

Finishes a mount operation started by g_file_mount_enclosing_volume().

mountMountable
void mountMountable(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Mounts a file of type G_FILE_TYPE_MOUNTABLE. Using @mount_operation, you can request callbacks when, for instance, passwords are needed during authentication.

mountMountableFinish
FileIF mountMountableFinish(AsyncResultIF result)

Finishes a mount operation. See g_file_mount_mountable() for details.

move
bool move(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData)

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.

openReadwrite
FileIOStream openReadwrite(Cancellable cancellable)

Opens an existing file for reading and writing. The result is a #GFileIOStream that can be used to read and write the contents of the file.

openReadwriteAsync
void openReadwriteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously opens @file for reading and writing.

openReadwriteFinish
FileIOStream openReadwriteFinish(AsyncResultIF res)

Finishes an asynchronous file read operation started with g_file_open_readwrite_async().

pollMountable
void pollMountable(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Polls a file of type #G_FILE_TYPE_MOUNTABLE.

pollMountableFinish
bool pollMountableFinish(AsyncResultIF result)

Finishes a poll operation. See g_file_poll_mountable() for details.

queryDefaultHandler
AppInfoIF queryDefaultHandler(Cancellable cancellable)

Returns the #GAppInfo that is registered as the default application to handle the file specified by @file.

queryExists
bool queryExists(Cancellable cancellable)

Utility function to check if a particular file exists. This is implemented using g_file_query_info() and as such does blocking I/O.

queryFileType
GFileType queryFileType(GFileQueryInfoFlags flags, Cancellable cancellable)

Utility function to inspect the #GFileType of a file. This is implemented using g_file_query_info() and as such does blocking I/O.

queryFilesystemInfo
FileInfo queryFilesystemInfo(string attributes, Cancellable cancellable)

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.

queryFilesystemInfoAsync
void queryFilesystemInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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).

queryFilesystemInfoFinish
FileInfo queryFilesystemInfoFinish(AsyncResultIF res)

Finishes an asynchronous filesystem info query. See g_file_query_filesystem_info_async().

queryInfo
FileInfo queryInfo(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable)

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).

queryInfoAsync
void queryInfoAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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).

queryInfoFinish
FileInfo queryInfoFinish(AsyncResultIF res)

Finishes an asynchronous file info query. See g_file_query_info_async().

querySettableAttributes
FileAttributeInfoList querySettableAttributes(Cancellable cancellable)

Obtain the list of settable attributes for the file.

queryWritableNamespaces
FileAttributeInfoList queryWritableNamespaces(Cancellable cancellable)

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).

read
FileInputStream read(Cancellable cancellable)

Opens a file for reading. The result is a #GFileInputStream that can be used to read the contents of the file.

readAsync
void readAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously opens @file for reading.

readFinish
FileInputStream readFinish(AsyncResultIF res)

Finishes an asynchronous file read operation started with g_file_read_async().

replace
FileOutputStream replace(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable)

Returns an output stream for overwriting the file, possibly creating a backup copy of the file first. If the file doesn't exist, it will be created.

replaceAsync
void replaceAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously overwrites the file, replacing the contents, possibly creating a backup copy of the file first.

replaceContents
bool replaceContents(string contents, string etag, bool makeBackup, GFileCreateFlags flags, string newEtag, Cancellable cancellable)

Replaces the contents of @file with @contents of @length bytes.

replaceContentsAsync
void replaceContentsAsync(string contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Starts an asynchronous replacement of @file with the given @contents of @length bytes. @etag will replace the document's current entity tag.

replaceContentsBytesAsync
void replaceContentsBytesAsync(Bytes contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Same as g_file_replace_contents_async() but takes a #GBytes input instead. This function will keep a ref on @contents until the operation is done. Unlike g_file_replace_contents_async() this allows forgetting about the content without waiting for the callback.

replaceContentsFinish
bool replaceContentsFinish(AsyncResultIF res, string newEtag)

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.

replaceFinish
FileOutputStream replaceFinish(AsyncResultIF res)

Finishes an asynchronous file replace operation started with g_file_replace_async().

replaceReadwrite
FileIOStream replaceReadwrite(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable)

Returns an output stream for overwriting the file in readwrite mode, possibly creating a backup copy of the file first. If the file doesn't exist, it will be created.

replaceReadwriteAsync
void replaceReadwriteAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously overwrites the file in read-write mode, replacing the contents, possibly creating a backup copy of the file first.

replaceReadwriteFinish
FileIOStream replaceReadwriteFinish(AsyncResultIF res)

Finishes an asynchronous file replace operation started with g_file_replace_readwrite_async().

resolveRelativePath
FileIF resolveRelativePath(string relativePath)

Resolves a relative path for @file to an absolute path.

setAttribute
bool setAttribute(string attribute, GFileAttributeType type, void* valueP, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets an attribute in the file with attribute name @attribute to @value.

setAttributeByteString
bool setAttributeByteString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable)

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.

setAttributeInt32
bool setAttributeInt32(string attribute, int value, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. If @attribute is of a different type, this operation will fail.

setAttributeInt64
bool setAttributeInt64(string attribute, long value, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. If @attribute is of a different type, this operation will fail.

setAttributeString
bool setAttributeString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. If @attribute is of a different type, this operation will fail.

setAttributeUint32
bool setAttributeUint32(string attribute, uint value, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. If @attribute is of a different type, this operation will fail.

setAttributeUint64
bool setAttributeUint64(string attribute, ulong value, GFileQueryInfoFlags flags, Cancellable cancellable)

Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. If @attribute is of a different type, this operation will fail.

setAttributesAsync
void setAttributesAsync(FileInfo info, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously sets the attributes of @file with @info.

setAttributesFinish
bool setAttributesFinish(AsyncResultIF result, FileInfo info)

Finishes setting an attribute started in g_file_set_attributes_async().

setAttributesFromInfo
bool setAttributesFromInfo(FileInfo info, GFileQueryInfoFlags flags, Cancellable cancellable)

Tries to set all attributes in the #GFileInfo on the target values, not stopping on the first error.

setDisplayName
FileIF setDisplayName(string displayName, Cancellable cancellable)

Renames @file to the specified display name.

setDisplayNameAsync
void setDisplayNameAsync(string displayName, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously sets the display name for a given #GFile.

setDisplayNameFinish
FileIF setDisplayNameFinish(AsyncResultIF res)

Finishes setting a display name started with g_file_set_display_name_async().

startMountable
void startMountable(GDriveStartFlags flags, MountOperation startOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Starts a file of type #G_FILE_TYPE_MOUNTABLE. Using @start_operation, you can request callbacks when, for instance, passwords are needed during authentication.

startMountableFinish
bool startMountableFinish(AsyncResultIF result)

Finishes a start operation. See g_file_start_mountable() for details.

stopMountable
void stopMountable(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Stops a file of type #G_FILE_TYPE_MOUNTABLE.

stopMountableFinish
bool stopMountableFinish(AsyncResultIF result)

Finishes an stop operation, see g_file_stop_mountable() for details.

supportsThreadContexts
bool supportsThreadContexts()

Checks if @file supports [thread-default contexts][g-main-context-push-thread-default-context]. If this returns %FALSE, you cannot perform asynchronous operations on @file in a thread that has a thread-default context.

trash
bool trash(Cancellable cancellable)

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.

trashAsync
void trashAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously sends @file to the Trash location, if possible.

trashFinish
bool trashFinish(AsyncResultIF result)

Finishes an asynchronous file trashing operation, started with g_file_trash_async().

unmountMountable
void unmountMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Unmounts a file of type G_FILE_TYPE_MOUNTABLE.

unmountMountableFinish
bool unmountMountableFinish(AsyncResultIF result)

Finishes an unmount operation, see g_file_unmount_mountable() for details.

unmountMountableWithOperation
void unmountMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Unmounts a file of type #G_FILE_TYPE_MOUNTABLE.

unmountMountableWithOperationFinish
bool unmountMountableWithOperationFinish(AsyncResultIF result)

Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.

Meta