Synopsis#include <gio/gio.h> GFileAttributeMatcher; enum GFileType; GFileInfo; #define G_FILE_ATTRIBUTE_STANDARD_TYPE #define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN #define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP #define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK #define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL #define G_FILE_ATTRIBUTE_STANDARD_NAME #define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME #define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME #define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME #define G_FILE_ATTRIBUTE_STANDARD_ICON #define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE #define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE #define G_FILE_ATTRIBUTE_STANDARD_SIZE #define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET #define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI #define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER #define G_FILE_ATTRIBUTE_ETAG_VALUE #define G_FILE_ATTRIBUTE_ID_FILE #define G_FILE_ATTRIBUTE_ID_FILESYSTEM #define G_FILE_ATTRIBUTE_ACCESS_CAN_READ #define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE #define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE #define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE #define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH #define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT #define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE #define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI #define G_FILE_ATTRIBUTE_TIME_MODIFIED #define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC #define G_FILE_ATTRIBUTE_TIME_ACCESS #define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC #define G_FILE_ATTRIBUTE_TIME_CHANGED #define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC #define G_FILE_ATTRIBUTE_TIME_CREATED #define G_FILE_ATTRIBUTE_TIME_CREATED_USEC #define G_FILE_ATTRIBUTE_UNIX_DEVICE #define G_FILE_ATTRIBUTE_UNIX_INODE #define G_FILE_ATTRIBUTE_UNIX_MODE #define G_FILE_ATTRIBUTE_UNIX_NLINK #define G_FILE_ATTRIBUTE_UNIX_UID #define G_FILE_ATTRIBUTE_UNIX_GID #define G_FILE_ATTRIBUTE_UNIX_RDEV #define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE #define G_FILE_ATTRIBUTE_UNIX_BLOCKS #define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT #define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE #define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM #define G_FILE_ATTRIBUTE_OWNER_USER #define G_FILE_ATTRIBUTE_OWNER_USER_REAL #define G_FILE_ATTRIBUTE_OWNER_GROUP #define G_FILE_ATTRIBUTE_THUMBNAIL_PATH #define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED #define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE #define G_FILE_ATTRIBUTE_FILESYSTEM_FREE #define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE #define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY #define G_FILE_ATTRIBUTE_GVFS_BACKEND #define G_FILE_ATTRIBUTE_SELINUX_CONTEXT #define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT #define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW #define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION GFileInfo* g_file_info_new (void); GFileInfo* g_file_info_dup (GFileInfo *other); void g_file_info_copy_into (GFileInfo *src_info, GFileInfo *dest_info); gboolean g_file_info_has_attribute (GFileInfo *info, const char *attribute); char** g_file_info_list_attributes (GFileInfo *info, const char *name_space); GFileAttributeType g_file_info_get_attribute_type (GFileInfo *info, const char *attribute); void g_file_info_remove_attribute (GFileInfo *info, const char *attribute); char* g_file_info_get_attribute_as_string (GFileInfo *info, const char *attribute); gboolean g_file_info_get_attribute_data (GFileInfo *info, const char *attribute, GFileAttributeType *type, gpointer *value_pp, GFileAttributeStatus *status); GFileAttributeStatus g_file_info_get_attribute_status (GFileInfo *info, const char *attribute); const char* g_file_info_get_attribute_string (GFileInfo *info, const char *attribute); const char* g_file_info_get_attribute_byte_string (GFileInfo *info, const char *attribute); gboolean g_file_info_get_attribute_boolean (GFileInfo *info, const char *attribute); guint32 g_file_info_get_attribute_uint32 (GFileInfo *info, const char *attribute); gint32 g_file_info_get_attribute_int32 (GFileInfo *info, const char *attribute); guint64 g_file_info_get_attribute_uint64 (GFileInfo *info, const char *attribute); gint64 g_file_info_get_attribute_int64 (GFileInfo *info, const char *attribute); GObject* g_file_info_get_attribute_object (GFileInfo *info, const char *attribute); void g_file_info_set_attribute (GFileInfo *info, const char *attribute, GFileAttributeType type, gpointer value_p); void g_file_info_set_attribute_string (GFileInfo *info, const char *attribute, const char *attr_value); void g_file_info_set_attribute_byte_string (GFileInfo *info, const char *attribute, const char *attr_value); void g_file_info_set_attribute_boolean (GFileInfo *info, const char *attribute, gboolean attr_value); void g_file_info_set_attribute_uint32 (GFileInfo *info, const char *attribute, guint32 attr_value); void g_file_info_set_attribute_int32 (GFileInfo *info, const char *attribute, gint32 attr_value); void g_file_info_set_attribute_uint64 (GFileInfo *info, const char *attribute, guint64 attr_value); void g_file_info_set_attribute_int64 (GFileInfo *info, const char *attribute, gint64 attr_value); void g_file_info_set_attribute_object (GFileInfo *info, const char *attribute, GObject *attr_value); void g_file_info_clear_status (GFileInfo *info); GFileType g_file_info_get_file_type (GFileInfo *info); gboolean g_file_info_get_is_hidden (GFileInfo *info); gboolean g_file_info_get_is_backup (GFileInfo *info); gboolean g_file_info_get_is_symlink (GFileInfo *info); const char* g_file_info_get_name (GFileInfo *info); const char* g_file_info_get_display_name (GFileInfo *info); const char* g_file_info_get_edit_name (GFileInfo *info); GIcon* g_file_info_get_icon (GFileInfo *info); const char* g_file_info_get_content_type (GFileInfo *info); goffset g_file_info_get_size (GFileInfo *info); void g_file_info_get_modification_time (GFileInfo *info, GTimeVal *result); const char* g_file_info_get_symlink_target (GFileInfo *info); const char* g_file_info_get_etag (GFileInfo *info); gint32 g_file_info_get_sort_order (GFileInfo *info); void g_file_info_set_attribute_mask (GFileInfo *info, GFileAttributeMatcher *mask); void g_file_info_unset_attribute_mask (GFileInfo *info); void g_file_info_set_file_type (GFileInfo *info, GFileType type); void g_file_info_set_is_hidden (GFileInfo *info, gboolean is_hidden); void g_file_info_set_is_symlink (GFileInfo *info, gboolean is_symlink); void g_file_info_set_name (GFileInfo *info, const char *name); void g_file_info_set_display_name (GFileInfo *info, const char *display_name); void g_file_info_set_edit_name (GFileInfo *info, const char *edit_name); void g_file_info_set_icon (GFileInfo *info, GIcon *icon); void g_file_info_set_content_type (GFileInfo *info, const char *content_type); void g_file_info_set_size (GFileInfo *info, goffset size); void g_file_info_set_modification_time (GFileInfo *info, GTimeVal *mtime); void g_file_info_set_symlink_target (GFileInfo *info, const char *symlink_target); void g_file_info_set_sort_order (GFileInfo *info, gint32 sort_order); GFileAttributeMatcher* g_file_attribute_matcher_new (const char *attributes); GFileAttributeMatcher* g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher); void g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher); gboolean g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher, const char *attribute); gboolean g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher, const char *attribute); gboolean g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher, const char *ns); const char* g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher); DescriptionFunctionality for manipulating basic metadata for files. GFileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes. See GFileAttribute for more information on how GIO handles file attributes.
To obtain a GFileInfo for a GFile, use
To change the actual attributes of a file, you should then set the
attribute in the GFileInfo and call
However, not all attributes can be changed in the file. For instance,
the actual size of a file cannot be changed via GFileAttributeMatcher allows for searching through a GFileInfo for attributes.
DetailsGFileAttributeMatchertypedef struct _GFileAttributeMatcher GFileAttributeMatcher; Determines if a string matches a file attribute.
enum GFileTypetypedef enum { G_FILE_TYPE_UNKNOWN = 0, G_FILE_TYPE_REGULAR, G_FILE_TYPE_DIRECTORY, G_FILE_TYPE_SYMBOLIC_LINK, G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */ G_FILE_TYPE_SHORTCUT, G_FILE_TYPE_MOUNTABLE } GFileType; Indicates the file's on-disk type.
GFileInfotypedef struct _GFileInfo GFileInfo; Stores information about a file system object referenced by a GFile.
G_FILE_ATTRIBUTE_STANDARD_TYPE#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) */
A key in the "standard" namespace for storing file types.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */
A key in the "standard" namespace for checking if a file is hidden.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup" /* boolean */
A key in the "standard" namespace for checking if a file is a backup file.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean */
A key in the "standard" namespace for checking if a file is virtual.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_NAME#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name" /* byte string */
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 G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
name in a user interface.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */ 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 GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_COPY_NAME#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */ 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 availible its 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 GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_ICON#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon" /* object (GIcon) */
A key in the "standard" namespace for getting the icon for the file.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type" /* string */
A key in the "standard" namespace for getting the content type of the file.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_SIZE#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 */
A key in the "standard" namespace for getting the file's size (in bytes).
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
A key in the "standard" namespace for getting the symlink target, if the file
is a symlink. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_STANDARD_TARGET_URI#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri" /* string */
A key in the "standard" namespace for getting the target URI for the file, in
the case of
G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order" /* int32 */
A key in the "standard" namespace for setting the sort order of a file.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ETAG_VALUE#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */
A key in the "etag" namespace for getting the value of the file's
entity tag. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ID_FILE#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */
A key in the "id" namespace for getting a file identifier.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ID_FILESYSTEM#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string */
A key in the "id" namespace for getting the file system identifier.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_READ#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read" /* boolean */
A key in the "access" namespace for getting read privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write" /* boolean */
A key in the "access" namespace for getting write privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */
A key in the "access" namespace for getting execution privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete" /* boolean */
A key in the "access" namespace for checking deletion privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */
A key in the "access" namespace for checking trashing privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */
A key in the "access" namespace for checking renaming privileges.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */
A key in the "mountable" namespace for getting the unix device.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi" /* string */
A key in the "mountable" namespace for getting the HAL UDI for the mountable
file. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_MODIFIED#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */
A key in the "time" namespace for getting the time the file was last
modified. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_ACCESS#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */
A key in the "time" namespace for getting the time the file was last
accessed. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_CHANGED#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed" /* uint64 */
A key in the "time" namespace for getting the time the file was last
changed. Corresponding GFileAttributeType is This corresponds to the traditional UNIX ctime.
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_TIME_CREATED#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created" /* uint64 */
A key in the "time" namespace for getting the time the file was created.
Corresponding GFileAttributeType is This corresponds to the NTFS ctime.
G_FILE_ATTRIBUTE_TIME_CREATED_USEC#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */
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 GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_DEVICE#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */
A key in the "unix" namespace for getting the device id of the device the
file is located on (see
G_FILE_ATTRIBUTE_UNIX_INODE#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */
A key in the "unix" namespace for getting the inode of the file.
This attribute is only available for UNIX file systems. Corresponding
GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_MODE#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */
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
G_FILE_ATTRIBUTE_UNIX_NLINK#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */
A key in the "unix" namespace for getting the number of hard links
for a file. See
G_FILE_ATTRIBUTE_UNIX_UID#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */
A key in the "unix" namespace for getting the user ID for the file.
This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_GID#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */
A key in the "unix" namespace for getting the group ID for the file.
This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_RDEV#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */
A key in the "unix" namespace for getting the device ID for the file
(if it is a special file). See
G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */
A key in the "unix" namespace for getting the block size for the file
system. This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_BLOCKS#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */
A key in the "unix" namespace for getting the number of blocks allocated
for the file. This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */
A key in the "unix" namespace for checking if the file represents a
UNIX mount point. This attribute is
G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */
A key in the "dos" namespace for checking if the file's archive flag
is set. This attribute is
G_FILE_ATTRIBUTE_DOS_IS_SYSTEM#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */
A key in the "dos" namespace for checking if the file's backup flag
is set. This attribute is
G_FILE_ATTRIBUTE_OWNER_USER#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */
A key in the "owner" namespace for getting the user name of the
file's owner. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_OWNER_USER_REAL#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */
A key in the "owner" namespace for getting the real name of the
user that owns the file. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_OWNER_GROUP#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group" /* string */
A key in the "owner" namespace for getting the file owner's group.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_THUMBNAIL_PATH#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */
A key in the "thumbnail" namespace for getting the path to the thumbnail
image. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */
A key in the "thumbnail" namespace for checking if thumbnailing failed.
This attribute is
G_FILE_ATTRIBUTE_FILESYSTEM_SIZE#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */
A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
used in
G_FILE_ATTRIBUTE_FILESYSTEM_FREE#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */
A key in the "filesystem" namespace for getting the number of bytes of free space left on the
file system. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_FILESYSTEM_TYPE#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type" /* string */
A key in the "filesystem" namespace for getting the file system's type.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_FILESYSTEM_READONLY#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */
A key in the "filesystem" namespace for checking if the file system
is read only. Is set to
G_FILE_ATTRIBUTE_GVFS_BACKEND#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */
A key in the "gvfs" namespace that gets the name of the current
GVFS backend in use. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_SELINUX_CONTEXT#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context" /* string */
A key in the "selinux" namespace for getting the file's SELinux
context. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count" /* uint32 */
A key in the "trash" namespace. When requested against
"trash:///" returns the number of (toplevel) items in the trash folder.
Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview" /* uint32 (GFilesystemPreviewType) */ A key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system. The value for this key contain a GFilesystemPreviewType.
G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string */ A key in the "standard" namespace for getting the description of the file. The description is a utf8 string that describes the file, generally containing the filename, but can also contain furter information. Example descriptions could be "filename (on hostname)" for a remote file or "filename (in trash)" for a file in the trash. This is useful for instance as the window title when displaying a directory or for a bookmarks menu.
Corresponding GFileAttributeType is
g_file_info_new ()GFileInfo* g_file_info_new (void); Creates a new file info structure.
g_file_info_copy_into ()void g_file_info_copy_into (GFileInfo *src_info, GFileInfo *dest_info);
Copies all of the GFileAttributes from
g_file_info_has_attribute ()gboolean g_file_info_has_attribute (GFileInfo *info, const char *attribute);
Checks if a file info structure has an attribute named
g_file_info_list_attributes ()char** g_file_info_list_attributes (GFileInfo *info, const char *name_space); Lists the file info structure's attributes.
g_file_info_get_attribute_type ()GFileAttributeType g_file_info_get_attribute_type (GFileInfo *info, const char *attribute); Gets the attribute type for an attribute key.
g_file_info_remove_attribute ()void g_file_info_remove_attribute (GFileInfo *info, const char *attribute);
Removes all cases of
g_file_info_get_attribute_as_string ()char* g_file_info_get_attribute_as_string (GFileInfo *info, const char *attribute); Gets the value of a attribute, formated as a string. This escapes things as needed to make the string valid utf8.
g_file_info_get_attribute_data ()gboolean g_file_info_get_attribute_data (GFileInfo *info, const char *attribute, GFileAttributeType *type, gpointer *value_pp, GFileAttributeStatus *status); Gets the attribute type, value and status for an attribute key.
g_file_info_get_attribute_status ()GFileAttributeStatus g_file_info_get_attribute_status (GFileInfo *info, const char *attribute); Gets the attribute status for an attribute key.
g_file_info_get_attribute_string ()const char* g_file_info_get_attribute_string (GFileInfo *info, const char *attribute);
Gets the value of a string attribute. If the attribute does
not contain a string,
g_file_info_get_attribute_byte_string ()const char* g_file_info_get_attribute_byte_string (GFileInfo *info, const char *attribute);
Gets the value of a byte string attribute. If the attribute does
not contain a byte string,
g_file_info_get_attribute_boolean ()gboolean g_file_info_get_attribute_boolean (GFileInfo *info, const char *attribute);
Gets the value of a boolean attribute. If the attribute does not
contain a boolean value,
g_file_info_get_attribute_uint32 ()guint32 g_file_info_get_attribute_uint32 (GFileInfo *info, const char *attribute); 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.
g_file_info_get_attribute_int32 ()gint32 g_file_info_get_attribute_int32 (GFileInfo *info, const char *attribute); 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.
g_file_info_get_attribute_uint64 ()guint64 g_file_info_get_attribute_uint64 (GFileInfo *info, const char *attribute); 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.
g_file_info_get_attribute_int64 ()gint64 g_file_info_get_attribute_int64 (GFileInfo *info, const char *attribute); 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.
g_file_info_get_attribute_object ()GObject* g_file_info_get_attribute_object (GFileInfo *info, const char *attribute);
Gets the value of a GObject attribute. If the attribute does
not contain a GObject,
g_file_info_set_attribute ()void g_file_info_set_attribute (GFileInfo *info, const char *attribute, GFileAttributeType type, gpointer value_p);
Sets the
g_file_info_set_attribute_string ()void g_file_info_set_attribute_string (GFileInfo *info, const char *attribute, const char *attr_value);
Sets the
g_file_info_set_attribute_byte_string ()void g_file_info_set_attribute_byte_string (GFileInfo *info, const char *attribute, const char *attr_value);
Sets the
g_file_info_set_attribute_boolean ()void g_file_info_set_attribute_boolean (GFileInfo *info, const char *attribute, gboolean attr_value);
Sets the
g_file_info_set_attribute_uint32 ()void g_file_info_set_attribute_uint32 (GFileInfo *info, const char *attribute, guint32 attr_value);
Sets the
g_file_info_set_attribute_int32 ()void g_file_info_set_attribute_int32 (GFileInfo *info, const char *attribute, gint32 attr_value);
Sets the
g_file_info_set_attribute_uint64 ()void g_file_info_set_attribute_uint64 (GFileInfo *info, const char *attribute, guint64 attr_value);
Sets the
g_file_info_set_attribute_int64 ()void g_file_info_set_attribute_int64 (GFileInfo *info, const char *attribute, gint64 attr_value);
Sets the
g_file_info_set_attribute_object ()void g_file_info_set_attribute_object (GFileInfo *info, const char *attribute, GObject *attr_value);
Sets the
g_file_info_clear_status ()void g_file_info_clear_status (GFileInfo *info);
Clears the status information from
g_file_info_get_file_type ()GFileType g_file_info_get_file_type (GFileInfo *info);
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_is_hidden ()gboolean g_file_info_get_is_hidden (GFileInfo *info); Checks if a file is hidden.
g_file_info_get_is_backup ()gboolean g_file_info_get_is_backup (GFileInfo *info); Checks if a file is a backup file.
g_file_info_get_is_symlink ()gboolean g_file_info_get_is_symlink (GFileInfo *info); Checks if a file is a symlink.
g_file_info_get_name ()const char* g_file_info_get_name (GFileInfo *info); Gets the name for a file.
g_file_info_get_display_name ()const char* g_file_info_get_display_name (GFileInfo *info); Gets a display name for a file.
g_file_info_get_edit_name ()const char* g_file_info_get_edit_name (GFileInfo *info); Gets the edit name for a file.
g_file_info_get_content_type ()const char* g_file_info_get_content_type (GFileInfo *info); Gets the file's content type.
g_file_info_get_size ()goffset g_file_info_get_size (GFileInfo *info); Gets the file's size.
g_file_info_get_modification_time ()void g_file_info_get_modification_time (GFileInfo *info, GTimeVal *result);
Gets the modification time of the current
g_file_info_get_symlink_target ()const char* g_file_info_get_symlink_target (GFileInfo *info); Gets the symlink target for a given GFileInfo.
g_file_info_get_etag ()const char* g_file_info_get_etag (GFileInfo *info);
Gets the entity tag for a given
GFileInfo. See
g_file_info_get_sort_order ()gint32 g_file_info_get_sort_order (GFileInfo *info);
Gets the value of the sort_order attribute from the GFileInfo.
See
g_file_info_set_attribute_mask ()void g_file_info_set_attribute_mask (GFileInfo *info, GFileAttributeMatcher *mask);
Sets
g_file_info_unset_attribute_mask ()void g_file_info_unset_attribute_mask (GFileInfo *info);
Unsets a mask set by
g_file_info_set_file_type ()void g_file_info_set_file_type (GFileInfo *info, GFileType type);
Sets the file type in a GFileInfo to
g_file_info_set_is_hidden ()void g_file_info_set_is_hidden (GFileInfo *info, gboolean is_hidden);
Sets the "is_hidden" attribute in a GFileInfo according to
g_file_info_set_is_symlink ()void g_file_info_set_is_symlink (GFileInfo *info, gboolean is_symlink);
Sets the "is_symlink" attribute in a GFileInfo according to
g_file_info_set_name ()void g_file_info_set_name (GFileInfo *info, const char *name);
Sets the name attribute for the current GFileInfo.
See
g_file_info_set_display_name ()void g_file_info_set_display_name (GFileInfo *info, const char *display_name);
Sets the display name for the current GFileInfo.
See
g_file_info_set_edit_name ()void g_file_info_set_edit_name (GFileInfo *info, const char *edit_name);
Sets the edit name for the current file.
See
g_file_info_set_icon ()void g_file_info_set_icon (GFileInfo *info, GIcon *icon);
Sets the icon for a given GFileInfo.
See
g_file_info_set_content_type ()void g_file_info_set_content_type (GFileInfo *info, const char *content_type);
Sets the content type attribute for a given GFileInfo.
See
g_file_info_set_size ()void g_file_info_set_size (GFileInfo *info, goffset size);
Sets the
g_file_info_set_modification_time ()void g_file_info_set_modification_time (GFileInfo *info, GTimeVal *mtime);
Sets the
g_file_info_set_symlink_target ()void g_file_info_set_symlink_target (GFileInfo *info, const char *symlink_target);
Sets the
g_file_info_set_sort_order ()void g_file_info_set_sort_order (GFileInfo *info, gint32 sort_order);
Sets the sort order attribute in the file info structure. See
g_file_attribute_matcher_new ()GFileAttributeMatcher* g_file_attribute_matcher_new (const char *attributes); Creates a new file attribute matcher, which matches attributes against a given string. GFileAttributeMatchers 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 Examples of strings to use: Table 3. File Attribute Matcher strings and results
g_file_attribute_matcher_ref ()GFileAttributeMatcher* g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher); References a file attribute matcher.
g_file_attribute_matcher_unref ()void g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher);
Unreferences
g_file_attribute_matcher_matches ()gboolean g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher, const char *attribute);
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
g_file_attribute_matcher_matches_only ()gboolean g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher, const char *attribute);
Checks if a attribute matcher only matches a given attribute. Always
returns
g_file_attribute_matcher_enumerate_namespace ()gboolean g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher, const char *ns);
Checks if the matcher will match all of the keys in a given namespace.
This will always return TODO: this is awkwardly worded.
g_file_attribute_matcher_enumerate_next ()const char* g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher); Gets the next matched attribute from a GFileAttributeMatcher.
|