FileImpl

data class FileImpl(val gioFilePointer: <Error class: unknown class><<Error class: unknown class>>) : File

The FileImpl type represents a native instance of the File interface.

Constructors

Link copied to clipboard
constructor(gioFilePointer: <Error class: unknown class><<Error class: unknown class>>)

Creates a new instance of File for the provided CPointer.

Properties

Link copied to clipboard
open override val gioFilePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
abstract val gioProxyPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun appendTo(flags: FileCreateFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileOutputStream>

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

Link copied to clipboard
open fun appendToAsync(flags: FileCreateFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously opens @file for appending.

Link copied to clipboard
open fun appendToFinish(res: AsyncResult): <Error class: unknown class><FileOutputStream>

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

Link copied to clipboard
open fun buildAttributeListForCopy(flags: FileCopyFlags, cancellable: Cancellable? = null): <Error class: unknown class><String>

Prepares the file attribute query string for copying to @file.

Link copied to clipboard
open fun connect(connection: IoStream, proxyAddress: ProxyAddress, cancellable: Cancellable? = null): <Error class: unknown class><IoStream>

Given @connection to communicate with a proxy (eg, a #GSocketConnection that is connected to the proxy server), this does the necessary handshake to connect to @proxy_address, and if required, wraps the #GIOStream to handle proxy payload.

Link copied to clipboard
open fun connectAsync(connection: IoStream, proxyAddress: ProxyAddress, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronous version of g_proxy_connect().

Link copied to clipboard
open fun connectFinish(result: AsyncResult): <Error class: unknown class><IoStream>

See g_proxy_connect().

Link copied to clipboard
open fun copy(destination: File, flags: FileCopyFlags, cancellable: Cancellable? = null, progressCallback: FileProgressCallback?): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun copyAsync(destination: File, flags: FileCopyFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, progressCallbackClosure: <Error class: unknown class>? = null, readyCallbackClosure: <Error class: unknown class>)

Version of method@Gio.File.copy_async using closures instead of callbacks for easier binding in other languages.

Link copied to clipboard
open fun copyAttributes(destination: File, flags: FileCopyFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Copies the file attributes from @source to @destination.

Link copied to clipboard
open fun copyFinish(res: AsyncResult): <Error class: unknown class><Boolean>

Finishes copying the file started with g_file_copy_async().

Link copied to clipboard
open fun create(flags: FileCreateFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileOutputStream>

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

Link copied to clipboard
open fun createAsync(flags: FileCreateFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun createFinish(res: AsyncResult): <Error class: unknown class><FileOutputStream>

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

Link copied to clipboard
open fun createReadwrite(flags: FileCreateFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileIoStream>

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

Link copied to clipboard
open fun createReadwriteAsync(flags: FileCreateFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun createReadwriteFinish(res: AsyncResult): <Error class: unknown class><FileIoStream>

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

Link copied to clipboard
open fun delete(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun deleteAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun deleteFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes deleting a file started with g_file_delete_async().

Link copied to clipboard
open fun dup(): File

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.

Link copied to clipboard
open fun ejectMountable(flags: MountUnmountFlags, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Starts an asynchronous eject on a mountable. When this operation has completed, @callback will be called with

Link copied to clipboard
open fun ejectMountableFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes an asynchronous eject operation started by g_file_eject_mountable().

Link copied to clipboard
open fun ejectMountableWithOperation(flags: MountUnmountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Starts an asynchronous eject on a mountable. When this operation has completed, @callback will be called with

Link copied to clipboard
open fun ejectMountableWithOperationFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes an asynchronous eject operation started by g_file_eject_mountable_with_operation().

Link copied to clipboard
open fun enumerateChildren(attributes: String, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileEnumerator>

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.

Link copied to clipboard
open fun enumerateChildrenAsync(attributes: String, flags: FileQueryInfoFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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.

Link copied to clipboard
open fun enumerateChildrenFinish(res: AsyncResult): <Error class: unknown class><FileEnumerator>

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

Link copied to clipboard
open fun equal(file2: File): Boolean

Checks if the two given #GFiles refer to the same file.

Link copied to clipboard
open fun findEnclosingMount(cancellable: Cancellable? = null): <Error class: unknown class><Mount>

Gets a #GMount for the #GFile.

Link copied to clipboard
open fun findEnclosingMountAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously gets the mount for the file.

Link copied to clipboard
open fun findEnclosingMountFinish(res: AsyncResult): <Error class: unknown class><Mount>

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

Link copied to clipboard
open fun getBasename(): String?

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

Link copied to clipboard
open fun getChild(name: String): File

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

Link copied to clipboard
open fun getChildForDisplayName(displayName: String): <Error class: unknown class><File>

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.

Link copied to clipboard
open fun getParent(): File?

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

Link copied to clipboard
open fun getParseName(): String

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

Link copied to clipboard
open fun getPath(): String?

Gets the local pathname for #GFile, if one exists. If non-null, this is guaranteed to be an absolute, canonical path. It might contain symlinks.

Link copied to clipboard
open fun getRelativePath(descendant: File): String?

Gets the path for @descendant relative to @parent.

Link copied to clipboard
open fun getUri(): String

Gets the URI for the @file.

Link copied to clipboard
open fun getUriScheme(): String?

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

Link copied to clipboard
open fun hash(): <Error class: unknown class>

Creates a hash value for a #GFile.

Link copied to clipboard
open fun hasParent(parent: File? = null): Boolean

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

Link copied to clipboard
open fun hasPrefix(prefix: File): Boolean

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

Link copied to clipboard
open fun hasUriScheme(uriScheme: String): Boolean

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

Link copied to clipboard
open fun isNative(): Boolean

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

Link copied to clipboard
open fun loadBytesAsync(cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously loads the contents of @file as #GBytes.

Link copied to clipboard
open fun loadContentsAsync(cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun makeDirectory(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun makeDirectoryAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously creates a directory.

Link copied to clipboard
open fun makeDirectoryFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun makeDirectoryWithParents(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun makeSymbolicLink(symlinkValue: String, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Creates a symbolic link named @file which contains the string

Link copied to clipboard
open fun makeSymbolicLinkAsync(symlinkValue: String, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun makeSymbolicLinkFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes an asynchronous symbolic link creation, started with g_file_make_symbolic_link_async().

Link copied to clipboard
open fun measureDiskUsageAsync(flags: FileMeasureFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, progressCallback: FileMeasureProgressCallback?, callback: AsyncReadyCallback?)

Recursively measures the disk usage of @file.

Link copied to clipboard
open fun monitor(flags: FileMonitorFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileMonitor>

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

Link copied to clipboard
open fun monitorDirectory(flags: FileMonitorFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileMonitor>

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

Link copied to clipboard
open fun monitorFile(flags: FileMonitorFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileMonitor>

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

Link copied to clipboard
open fun mountEnclosingVolume(flags: MountMountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun mountEnclosingVolumeFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes a mount operation started by g_file_mount_enclosing_volume().

Link copied to clipboard
open fun mountMountable(flags: MountMountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun mountMountableFinish(result: AsyncResult): <Error class: unknown class><File>

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

Link copied to clipboard
open fun move(destination: File, flags: FileCopyFlags, cancellable: Cancellable? = null, progressCallback: FileProgressCallback?): <Error class: unknown class><Boolean>

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.

Link copied to clipboard
open fun moveAsync(destination: File, flags: FileCopyFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, progressCallbackClosure: <Error class: unknown class>? = null, readyCallbackClosure: <Error class: unknown class>)

Version of method@Gio.File.move_async using closures instead of callbacks for easier binding in other languages.

Link copied to clipboard
open fun moveFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes an asynchronous file movement, started with g_file_move_async().

Link copied to clipboard
open fun openReadwrite(cancellable: Cancellable? = null): <Error class: unknown class><FileIoStream>

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.

Link copied to clipboard
open fun openReadwriteAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously opens @file for reading and writing.

Link copied to clipboard
open fun openReadwriteFinish(res: AsyncResult): <Error class: unknown class><FileIoStream>

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

Link copied to clipboard
open fun peekPath(): String?

Exactly like g_file_get_path(), but caches the result via g_object_set_qdata_full(). This is useful for example in C applications which mix g_file_* APIs with native ones. It also avoids an extra duplicated string when possible, so will be generally more efficient.

Link copied to clipboard
open fun pollMountable(cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Polls a file of type %G_FILE_TYPE_MOUNTABLE.

Link copied to clipboard
open fun pollMountableFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun queryDefaultHandler(cancellable: Cancellable? = null): <Error class: unknown class><AppInfo>

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

Link copied to clipboard
open fun queryDefaultHandlerAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Async version of g_file_query_default_handler().

Link copied to clipboard
open fun queryDefaultHandlerFinish(result: AsyncResult): <Error class: unknown class><AppInfo>

Finishes a g_file_query_default_handler_async() operation.

Link copied to clipboard
open fun queryExists(cancellable: Cancellable? = null): Boolean

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

Link copied to clipboard
open fun queryFilesystemInfo(attributes: String, cancellable: Cancellable? = null): <Error class: unknown class><FileInfo>

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.

Link copied to clipboard
open fun queryFilesystemInfoAsync(attributes: String, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun queryFilesystemInfoFinish(res: AsyncResult): <Error class: unknown class><FileInfo>

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

Link copied to clipboard
open fun queryFileType(flags: FileQueryInfoFlags, cancellable: Cancellable? = null): FileType

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

Link copied to clipboard
open fun queryInfo(attributes: String, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileInfo>

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

Link copied to clipboard
open fun queryInfoAsync(attributes: String, flags: FileQueryInfoFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun queryInfoFinish(res: AsyncResult): <Error class: unknown class><FileInfo>

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

Link copied to clipboard
open fun querySettableAttributes(cancellable: Cancellable? = null): <Error class: unknown class><FileAttributeInfoList>

Obtain the list of settable attributes for the file.

Link copied to clipboard
open fun queryWritableNamespaces(cancellable: Cancellable? = null): <Error class: unknown class><FileAttributeInfoList>

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

Link copied to clipboard
open fun read(cancellable: Cancellable? = null): <Error class: unknown class><FileInputStream>

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

Link copied to clipboard
open fun readAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously opens @file for reading.

Link copied to clipboard
open fun readFinish(res: AsyncResult): <Error class: unknown class><FileInputStream>

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

Link copied to clipboard
open fun replace(etag: String? = null, makeBackup: Boolean, flags: FileCreateFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileOutputStream>

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.

Link copied to clipboard
open fun replaceAsync(etag: String? = null, makeBackup: Boolean, flags: FileCreateFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun replaceContentsBytesAsync(contents: <Error class: unknown class>, etag: String? = null, makeBackup: Boolean, flags: FileCreateFlags, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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.

Link copied to clipboard
open fun replaceFinish(res: AsyncResult): <Error class: unknown class><FileOutputStream>

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

Link copied to clipboard
open fun replaceReadwrite(etag: String? = null, makeBackup: Boolean, flags: FileCreateFlags, cancellable: Cancellable? = null): <Error class: unknown class><FileIoStream>

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.

Link copied to clipboard
open fun replaceReadwriteAsync(etag: String? = null, makeBackup: Boolean, flags: FileCreateFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun replaceReadwriteFinish(res: AsyncResult): <Error class: unknown class><FileIoStream>

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

Link copied to clipboard
open fun resolveRelativePath(relativePath: String): File

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

Link copied to clipboard
open fun setAttribute(attribute: String, type: FileAttributeType, valueP: <Error class: unknown class>? = null, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributeByteString(attribute: String, value: String, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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.

Link copied to clipboard
open fun setAttributeInt32(attribute: String, value: <Error class: unknown class>, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributeInt64(attribute: String, value: <Error class: unknown class>, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributesAsync(info: FileInfo, flags: FileQueryInfoFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously sets the attributes of @file with @info.

Link copied to clipboard
open fun setAttributesFromInfo(info: FileInfo, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributeString(attribute: String, value: String, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributeUint32(attribute: String, value: <Error class: unknown class>, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setAttributeUint64(attribute: String, value: <Error class: unknown class>, flags: FileQueryInfoFlags, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun setDisplayName(displayName: String, cancellable: Cancellable? = null): <Error class: unknown class><File>

Renames @file to the specified display name.

Link copied to clipboard
open fun setDisplayNameAsync(displayName: String, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously sets the display name for a given #GFile.

Link copied to clipboard
open fun setDisplayNameFinish(res: AsyncResult): <Error class: unknown class><File>

Finishes setting a display name started with g_file_set_display_name_async().

Link copied to clipboard
open fun startMountable(flags: DriveStartFlags, startOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun startMountableFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun stopMountable(flags: MountUnmountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Stops a file of type %G_FILE_TYPE_MOUNTABLE.

Link copied to clipboard
open fun stopMountableFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard

Some proxy protocols expect to be passed a hostname, which they will resolve to an IP address themselves. Others, like SOCKS4, do not allow this. This function will return false if @proxy is implementing such a protocol. When false is returned, the caller should resolve the destination hostname first, and then pass a #GProxyAddress containing the stringified IP address to g_proxy_connect() or g_proxy_connect_async().

Link copied to clipboard

Checks if @file supports g-main-context-push-thread-default-context. If this returns false, you cannot perform asynchronous operations on

Link copied to clipboard
open fun trash(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Sends @file to the "Trashcan", if possible. This is similar to deleting it, but the user can recover it before emptying the trashcan. Trashing is disabled for system mounts by default (see g_unix_mount_is_system_internal()), so this call can return the %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the x-gvfs-notrash unix mount option can be used to disable g_file_trash() support for particular mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case. Since 2.82, the x-gvfs-trash unix mount option can be used to enable g_file_trash() support for particular system mounts.

Link copied to clipboard
open fun trashAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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

Link copied to clipboard
open fun trashFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun unmountMountable(flags: MountUnmountFlags, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Unmounts a file of type G_FILE_TYPE_MOUNTABLE.

Link copied to clipboard
open fun unmountMountableFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun unmountMountableWithOperation(flags: MountUnmountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Unmounts a file of type %G_FILE_TYPE_MOUNTABLE.

Link copied to clipboard
open fun unmountMountableWithOperationFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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