From 784b229c9f54e5197adbd566cd42009e4bcfd055 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sat, 18 Apr 2009 13:32:03 +0200 Subject: Commit some more work on gio.File Docs Added some more methods to gio.File and gio file constants --- docs/reference/pygio-constants.xml | 542 ++++++++++++++++++++++++++++++++++++- 1 file changed, 540 insertions(+), 2 deletions(-) (limited to 'docs/reference/pygio-constants.xml') diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml index 6bddc93..cc71fe3 100644 --- a/docs/reference/pygio-constants.xml +++ b/docs/reference/pygio-constants.xml @@ -15,12 +15,14 @@ + + @@ -301,6 +303,489 @@ + + Gio File Attribute Constants + + + The file attributes. + + + + + gio.FILE_ATTRIBUTE_STANDARD_TYPE + + + "standard::type" A key in the "standard" namespace for storing file types. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a + + + + + + gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN + + + "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP + + + "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK + + + "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink. + Typically the actual type is something else, if we followed the symlink to get the type. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL + + + "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_STANDARD_NAME + + + "standard::name" A key in the "standard" namespace for getting the name of the file. + The name is the on-disk filename which may not be in any known encoding, + and can thus not be generally displayed as is. Use + gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user + interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + + + "standard::display-name" A key in the "standard" namespace for getting the display + name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed + in the UI. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME + + + "standard::edit-name" A key in the "standard" namespace for edit name of the file. + An edit name is similar to the display name, but it is meant to be used when you want + to rename the file in the UI. The display name might contain information you don't + want in the new filename (such as "(invalid unicode)" if the filename was in an + invalid encoding). Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME + + + "standard::copy-name" A key in the "standard" namespace for getting the copy + name of the file. The copy name is an optional version of the name. If available + it's always in UTF8, and corresponds directly to the original filename (only transcoded + to UTF8). This is useful if you want to copy the file to another filesystem that might + have a different encoding. If the filename is not a valid string in the encoding selected + for the filesystem it is in then the copy name will not be set. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_ICON + + + "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a + gio.Icon. + + + + + gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE + + + "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type. + + + + + gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE + + + "standard::fast-content-type" A key in the "standard" namespace for getting the fast + content type. The fast content type isn't as reliable as the regular one, as it + only uses the filename to guess it, but it is faster to calculate than the regular + content type. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_SIZE + + + "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT64. + + + + + gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET + + + "standard::symlink-target" A key in the "standard" namespace for getting the target URI + for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding + + is G_FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER + + + "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this + key to set the order files are displayed. Files with smaller sort order should be sorted first, + and files without sort order as if sort order was zero. + + + + + gio.FILE_ATTRIBUTE_ETAG_VALUE + + + "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_ID_FILE + + + "id::file" A key in the "id" namespace for getting a file identifier. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files, + to avoid recursive directory scanning. + + + + + gio.FILE_ATTRIBUTE_ID_FILESYSTEM + + + "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and + drop to see if the source and target are on the same filesystem (default to move) or not (default to copy). + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_READ + + + "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding + + is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to read the file. + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE + + + "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to write to the file. + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE + + + "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to execute the file. + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE + + + "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to delete the file. + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH + + + "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to move the file to the trash. + + + + + gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME + + + "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding + + is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be True + if the user is able to rename the file. + + + + + gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT + + + "mountable::can-mount" A key in the "mountable" namespace for checking if + a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT + + + "mountable::can-unmount" A key in the "mountable" namespace for checking if a file + (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT + + + "mountable::can-eject" A key in the "mountable" namespace for checking if a file + (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE + + + "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI + + + "mountable::hal-udi" A key in the "mountable" namespace for getting the + HAL UDI for the mountable file. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_STRING. + + + + + gio.FILE_ATTRIBUTE_TIME_MODIFIED + + + "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified. + + + + + gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC + + + "time::modified-usec" A key in the "time" namespace for getting the miliseconds + of the time the file was last modified. This should be used in conjunction + with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding + + is G_FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_TIME_ACCESS + + + "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed. + + + + + gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC + + + "time::access-usec" A key in the "time" namespace for getting the microseconds of + the time the file was last accessed. This should be used in conjunction + with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_TIME_CHANGED + + + "time::changed" A key in the "time" namespace for getting the time the + file was last changed. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed. + This corresponds to the traditional UNIX ctime. + + + + + gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC + + + "time::changed-usec" A key in the "time" namespace for getting the microseconds + of the time the file was last changed. This should be used in conjunction + with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_TIME_CREATED + + + "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created. + This corresponds to the NTFS ctime. + + + + + gio.FILE_ATTRIBUTE_TIME_CREATED_USEC + + + "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the + file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_UNIX_DEVICE + + + "unix::device" A key in the "unix" namespace for getting the device id of the device the file + is located on (see stat() documentation). This attribute is only available + for UNIX file systems. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_UNIX_INODE + + + "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only + available for UNIX file systems. Corresponding + + is G_FILE_ATTRIBUTE_TYPE_UINT64. + + + + + gio.FILE_ATTRIBUTE_UNIX_MODE + + + "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g. + whether the file is a regular file, symlink, etc). See lstat() documentation. + This attribute is only available for UNIX file systems. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_UNIX_NLINK + + + "unix::nlink" A key in the "unix" namespace for getting the number of hard links + for a file. See lstat() documentation. This attribute is only available for UNIX + file systems. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + gio.FILE_ATTRIBUTE_UNIX_UID + + + "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute + is only available for UNIX file systems. Corresponding + + is gio.FILE_ATTRIBUTE_TYPE_UINT32. + + + + + + Gio File Attribute Type Constants @@ -485,7 +970,7 @@ - Gio File Copy Monitor Constants + Gio File Monitor Flags Constants Flags used to set what a @@ -510,7 +995,7 @@ - Gio File Create Flags Constants + Gio File Query Info Flags Constants Flags used when querying a @@ -533,6 +1018,59 @@ + + Gio File Type Constants + + + Indicates the file's on-disk type. + + + + + gio.FILE_TYPE_DIRECTORY + + File handle represents a directory. + + + + gio.FILE_TYPE_MOUNTABLE + + File is a mountable location. + + + + gio.FILE_TYPE_REGULAR + + File handle represents a regular file. + + + + gio.FILE_TYPE_SHORTCUT + + File is a shortcut (Windows systems). + + + + gio.FILE_TYPE_SPECIAL + + File is a "special" file, such as a socket, fifo, block device, or character device. + + + + gio.FILE_TYPE_SYMBOLIC_LINK + + File handle represents a symbolic link (Unix systems). + + + + gio.FILE_TYPE_UNKNOWN + + File's type is unknown. + + + + + Gio Mount Mount Flags Constants -- cgit