Functions
g_file_info_new ()
GFileInfo *
g_file_info_new (void);
Creates a new file info structure.
g_file_info_dup ()
GFileInfo *
g_file_info_dup (GFileInfo *other);
Duplicates a file info structure.
Returns
a duplicate GFileInfo of other
.
[transfer full]
g_file_info_copy_into ()
void
g_file_info_copy_into (GFileInfo *src_info,
GFileInfo *dest_info);
First clears all of the GFileAttribute of dest_info
,
and then copies all of the file attributes from src_info
to dest_info
.
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 attribute
.
Returns
TRUE if info
has an attribute named attribute
,
FALSE otherwise.
g_file_info_has_namespace ()
gboolean
g_file_info_has_namespace (GFileInfo *info,
const char *name_space);
Checks if a file info structure has an attribute in the
specified name_space
.
Returns
TRUE if info
has an attribute in name_space
,
FALSE otherwise.
Since: 2.22
g_file_info_list_attributes ()
char **
g_file_info_list_attributes (GFileInfo *info,
const char *name_space);
Lists the file info structure's attributes.
Returns
a
null-terminated array of strings of all of the possible attribute
types for the given name_space
, or NULL on error.
[nullable][array zero-terminated=1][transfer full]
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 attribute
from info
if it exists.
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
UTF-8.
Returns
a UTF-8 string associated with the given attribute
, or
NULL if the attribute wasn’t set.
When you're done with the string it must be freed with g_free().
[nullable]
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.
Returns
TRUE if info
has an attribute named attribute
,
FALSE otherwise.
[transfer none]
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, NULL will be returned.
Returns
the contents of the attribute
value as a UTF-8 string, or
NULL otherwise.
g_file_info_get_attribute_stringv ()
char **
g_file_info_get_attribute_stringv (GFileInfo *info,
const char *attribute);
Gets the value of a stringv attribute. If the attribute does
not contain a stringv, NULL will be returned.
Returns
the contents of the attribute
value as a stringv, or
NULL otherwise. Do not free. These returned strings are UTF-8.
[transfer none]
Since: 2.22
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, NULL will be returned.
Returns
the contents of the attribute
value as a byte string, or
NULL otherwise.
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, FALSE will be returned.
Returns
the boolean value contained within the attribute.
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.
Returns
an unsigned 32-bit integer from the attribute.
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.
Returns
a signed 32-bit integer from the attribute.
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.
Returns
a unsigned 64-bit integer from the attribute.
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 a signed 64-bit integer, or is invalid,
0 will be returned.
Returns
a signed 64-bit integer from the attribute.
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, NULL will be returned.
Returns
a GObject associated with the given attribute
, or
NULL otherwise.
[transfer none]
g_file_info_set_attribute_status ()
gboolean
g_file_info_set_attribute_status (GFileInfo *info,
const char *attribute,
GFileAttributeStatus status);
Sets the attribute status for an attribute key. This is only
needed by external code that implement g_file_set_attributes_from_info()
or similar functions.
The attribute must exist in info
for this to work. Otherwise FALSE
is returned and info
is unchanged.
Returns
TRUE if the status was changed, FALSE if the key was not set.
Since: 2.22
g_file_info_set_attribute_string ()
void
g_file_info_set_attribute_string (GFileInfo *info,
const char *attribute,
const char *attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_stringv ()
void
g_file_info_set_attribute_stringv (GFileInfo *info,
const char *attribute,
char **attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
Sinze: 2.22
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 attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_boolean ()
void
g_file_info_set_attribute_boolean (GFileInfo *info,
const char *attribute,
gboolean attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_uint32 ()
void
g_file_info_set_attribute_uint32 (GFileInfo *info,
const char *attribute,
guint32 attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_int32 ()
void
g_file_info_set_attribute_int32 (GFileInfo *info,
const char *attribute,
gint32 attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_uint64 ()
void
g_file_info_set_attribute_uint64 (GFileInfo *info,
const char *attribute,
guint64 attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_int64 ()
void
g_file_info_set_attribute_int64 (GFileInfo *info,
const char *attribute,
gint64 attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_set_attribute_object ()
void
g_file_info_set_attribute_object (GFileInfo *info,
const char *attribute,
GObject *attr_value);
Sets the attribute
to contain the given attr_value
,
if possible.
g_file_info_clear_status ()
void
g_file_info_clear_status (GFileInfo *info);
Clears the status information from info
.
g_file_info_get_is_hidden ()
gboolean
g_file_info_get_is_hidden (GFileInfo *info);
Checks if a file is hidden.
Returns
TRUE if the file is a hidden file, FALSE otherwise.
g_file_info_get_is_backup ()
gboolean
g_file_info_get_is_backup (GFileInfo *info);
Checks if a file is a backup file.
Returns
TRUE if file is a backup file, FALSE otherwise.
g_file_info_get_is_symlink ()
gboolean
g_file_info_get_is_symlink (GFileInfo *info);
Checks if a file is a symlink.
Returns
TRUE if the given info
is a symlink.
g_file_info_get_name ()
const char *
g_file_info_get_name (GFileInfo *info);
Gets the name for a file.
Returns
a string containing the file name.
[type filename]
g_file_info_get_display_name ()
const char *
g_file_info_get_display_name (GFileInfo *info);
Gets a display name for a file.
Returns
a string containing the display name.
g_file_info_get_edit_name ()
const char *
g_file_info_get_edit_name (GFileInfo *info);
Gets the edit name for a file.
Returns
a string containing the edit name.
g_file_info_get_icon ()
GIcon *
g_file_info_get_icon (GFileInfo *info);
Gets the icon for a file.
Returns
GIcon for the given info
.
[transfer none]
g_file_info_get_symbolic_icon ()
GIcon *
g_file_info_get_symbolic_icon (GFileInfo *info);
Gets the symbolic icon for a file.
Returns
GIcon for the given info
.
[transfer none]
Since: 2.34
g_file_info_get_content_type ()
const char *
g_file_info_get_content_type (GFileInfo *info);
Gets the file's content type.
Returns
a string containing the file's content type.
g_file_info_get_size ()
goffset
g_file_info_get_size (GFileInfo *info);
Gets the file's size.
Returns
a goffset containing the file's size.
g_file_info_get_modification_time ()
void
g_file_info_get_modification_time (GFileInfo *info,
GTimeVal *result);
g_file_info_get_modification_time has been deprecated since version 2.62 and should not be used in newly-written code.
Use g_file_info_get_modification_date_time() instead, as
GTimeVal is deprecated due to the year 2038 problem.
Gets the modification time of the current info
and sets it
in result
.
g_file_info_get_modification_date_time ()
GDateTime *
g_file_info_get_modification_date_time
(GFileInfo *info);
Gets the modification time of the current info
and returns it as a
GDateTime.
This requires the G_FILE_ATTRIBUTE_TIME_MODIFIED attribute. If
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting GDateTime
will have microsecond precision.
Returns
modification time, or NULL if unknown.
[transfer full][nullable]
Since: 2.62
g_file_info_get_symlink_target ()
const char *
g_file_info_get_symlink_target (GFileInfo *info);
Gets the symlink target for a given GFileInfo.
Returns
a string containing the symlink target.
g_file_info_get_deletion_date ()
GDateTime *
g_file_info_get_deletion_date (GFileInfo *info);
Returns the GDateTime representing the deletion date of the file, as
available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the
G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, NULL is returned.
Returns
a GDateTime, or NULL.
Since: 2.36
g_file_info_set_attribute_mask ()
void
g_file_info_set_attribute_mask (GFileInfo *info,
GFileAttributeMatcher *mask);
Sets mask
on info
to match specific attribute types.
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 attributes
string should be formatted with specific keys separated
from namespaces with a double colon. Several "namespace::key" strings may be
concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
The wildcard "*" may be used to match all keys and namespaces, or
"namespace::*" will match all keys in a given namespace.
Examples of file attribute matcher strings and results
"*": matches all attributes.
"standard::is-hidden": matches only the key is-hidden in the
standard namespace.
"standard::type,unix::*": matches the type key in the standard
namespace and all keys in the unix namespace.
g_file_attribute_matcher_subtract ()
GFileAttributeMatcher *
g_file_attribute_matcher_subtract (GFileAttributeMatcher *matcher,
GFileAttributeMatcher *subtract);
Subtracts all attributes of subtract
from matcher
and returns
a matcher that supports those attributes.
Note that currently it is not possible to remove a single
attribute when the matcher
matches the whole namespace - or remove
a namespace or attribute when the matcher matches everything. This
is a limitation of the current implementation, but may be fixed
in the future.
Returns
A file attribute matcher matching all attributes of
matcher
that are not matched by subtract
g_file_attribute_matcher_unref ()
void
g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher);
Unreferences matcher
. If the reference count falls below 1,
the matcher
is automatically freed.
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 TRUE.
Returns
TRUE if attribute
matches matcher
. FALSE otherwise.
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 FALSE if "*" was used when creating the matcher.
Returns
TRUE if the matcher only matches attribute
. FALSE otherwise.
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 TRUE if a wildcard character is in use (e.g. if
matcher was created with "standard::*" and ns
is "standard", or if matcher was created
using "*" and namespace is anything.)
TODO: this is awkwardly worded.
Returns
TRUE if the matcher matches all of the entries
in the given ns
, FALSE otherwise.
g_file_attribute_matcher_enumerate_next ()
const char *
g_file_attribute_matcher_enumerate_next
(GFileAttributeMatcher *matcher);
Gets the next matched attribute from a GFileAttributeMatcher.
Returns
a string containing the next attribute or NULL if
no more attribute exist.
g_file_attribute_matcher_to_string ()
char *
g_file_attribute_matcher_to_string (GFileAttributeMatcher *matcher);
Prints what the matcher is matching against. The format will be
equal to the format passed to g_file_attribute_matcher_new().
The output however, might not be identical, as the matcher may
decide to use a different order or omit needless parts.
Returns
a string describing the attributes the matcher matches
against or NULL if matcher
was NULL.
Since: 2.32
Types and Values
GFileAttributeMatcher
typedef struct _GFileAttributeMatcher GFileAttributeMatcher;
Determines if a string matches a file attribute.
enum GFileType
Indicates the file's on-disk type.
On Windows systems a file will never have G_FILE_TYPE_SYMBOLIC_LINK type;
use GFileInfo and G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine
whether a file is a symlink or not. This is due to the fact that NTFS does
not have a single filesystem object type for symbolic links - it has
files that symlink to files, and directories that symlink to directories.
GFileType enumeration cannot precisely represent this important distinction,
which is why all Windows symlinks will continue to be reported as
G_FILE_TYPE_REGULAR or G_FILE_TYPE_DIRECTORY.
GFileInfo
typedef 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_TYPE_UINT32.
The value for this key should contain a GFileType.
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_TYPE_BOOLEAN.
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_TYPE_BOOLEAN.
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.
On Windows NTFS mountpoints are considered to be symlinks as well.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
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_TYPE_BOOLEAN.
G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE
#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile" /* boolean */
A key in the "standard" namespace for checking if a file is
volatile. This is meant for opaque, non-POSIX-like backends to
indicate that the URI is not persistent. Applications should look
at G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.46
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_TYPE_BYTE_STRING.
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_TYPE_STRING.
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_TYPE_STRING.
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 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 GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.
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_ATTRIBUTE_TYPE_STRING.
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_TYPE_OBJECT.
The value for this key should contain a GIcon.
G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON
#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon" /* object (GIcon) */
A key in the "standard" namespace for getting the symbolic icon for the file.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a GIcon.
Since: 2.34
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_TYPE_STRING.
The value for this key should contain a valid content type.
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_TYPE_STRING.
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_TYPE_UINT64.
G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE
#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */
A key in the "standard" namespace for getting the amount of disk space
that is consumed by the file (in bytes). This will generally be larger
than the file size (due to block size overhead) but can occasionally be
smaller (for example, for sparse files).
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64.
Since: 2.20
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_TYPE_BYTE_STRING.
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_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.
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_TYPE_STRING.
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_TYPE_STRING.
An example use would be during listing files, to avoid recursive
directory scanning.
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_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).
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to read the file.
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to write to the file.
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to execute the file.
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to delete the file.
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to move the file to
the trash.
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_TYPE_BOOLEAN.
This attribute will be TRUE if the user is able to rename the file.
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_TYPE_BOOLEAN.
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_TYPE_BOOLEAN.
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_TYPE_BOOLEAN.
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_TYPE_UINT32.
G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */
A key in the "mountable" namespace for getting the unix device file.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.
Since: 2.22
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_TYPE_STRING.
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.22
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
degraded.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.22
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.22
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.22
G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC
#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic" /* boolean */
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
is automatically polled for media.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.22
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_TYPE_UINT64, and contains the time since the
file was modified, in seconds since the UNIX epoch.
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_TYPE_UINT64, and contains the time since the
file was last accessed, in seconds since the UNIX epoch.
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 G_FILE_ATTRIBUTE_TYPE_UINT64,
and contains the time since the file was last changed, in seconds since the
UNIX epoch.
This corresponds to the traditional UNIX ctime.
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 G_FILE_ATTRIBUTE_TYPE_UINT64,
and contains the time since the file was created, in seconds since the UNIX
epoch.
This corresponds to the NTFS ctime.
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 stat() documentation). This attribute is only
available for UNIX file systems. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_UINT32.
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_TYPE_UINT64.
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 the
documentation for lstat(): this attribute is equivalent to the st_mode
member of struct stat, and includes both the file type and permissions.
This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.
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 lstat() documentation. This attribute is only available
for UNIX file systems. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_UINT32.
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_TYPE_UINT32.
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_TYPE_UINT32.
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 lstat() documentation. This attribute
is only available for UNIX file systems. Corresponding GFileAttributeType
is G_FILE_ATTRIBUTE_TYPE_UINT32.
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_TYPE_UINT32.
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_TYPE_UINT64.
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 TRUE if the file is a UNIX mount
point. Since 2.58, / is considered to be a mount point.
This attribute is only available for UNIX file systems.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
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 TRUE if the archive flag is set. This attribute
is only available for DOS file systems. Corresponding GFileAttributeType
is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT
#define G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT "dos::is-mountpoint" /* boolean */
A key in the "dos" namespace for checking if the file is a NTFS mount point
(a volume mount or a junction point).
This attribute is TRUE if file is a reparse point of type
IO_REPARSE_TAG_MOUNT_POINT.
This attribute is only available for DOS file systems.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.60
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 TRUE if the backup flag is set. This attribute
is only available for DOS file systems. Corresponding GFileAttributeType
is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG
#define G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG "dos::reparse-point-tag" /* uint32 */
A key in the "dos" namespace for getting the file NTFS reparse tag.
This value is 0 for files that are not reparse points.
See the Reparse Tags
page for possible reparse tag values. Corresponding GFileAttributeType
is G_FILE_ATTRIBUTE_TYPE_UINT32.
Since: 2.60
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_TYPE_STRING.
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_TYPE_STRING.
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_TYPE_BYTE_STRING.
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 TRUE if thumbnailing failed. Corresponding
GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid" /* boolean */
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
This attribute is TRUE if the thumbnail is up-to-date with the file it represents,
and FALSE if the file has been modified since the thumbnail was generated.
If G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is TRUE and this attribute is FALSE,
it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Since: 2.40
G_FILE_ATTRIBUTE_PREVIEW_ICON
#define G_FILE_ATTRIBUTE_PREVIEW_ICON "preview::icon" /* object (GIcon) */
A key in the "preview" namespace for getting a GIcon that can be
used to get preview of the file. For example, it may be a low
resolution thumbnail without metadata. Corresponding
GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_OBJECT. The value
for this key should contain a GIcon.
Since: 2.20
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_TYPE_UINT64.
G_FILE_ATTRIBUTE_FILESYSTEM_USED
#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used" /* uint64 */
A key in the "filesystem" namespace for getting the number of bytes of used on the
file system. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_UINT64.
Since: 2.32
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_TYPE_STRING.
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 TRUE if the file system is read only.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
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_FILESYSTEM_REMOTE
#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote" /* boolean */
A key in the "filesystem" namespace for checking if the file system
is remote. Is set to TRUE if the file system is remote.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
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_TYPE_STRING.
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_TYPE_STRING. Note that this attribute is only
available if GLib has been built with SELinux support.
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_TYPE_UINT32.
G_FILE_ATTRIBUTE_TRASH_ORIG_PATH
#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path" /* byte string */
A key in the "trash" namespace. When requested against
items in trash:///, will return the original path to the file before it
was trashed. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
Since: 2.24
G_FILE_ATTRIBUTE_TRASH_DELETION_DATE
#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date" /* string */
A key in the "trash" namespace. When requested against
items in trash:///, will return the date and time when the file
was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.
Since: 2.24
G_FILE_ATTRIBUTE_RECENT_MODIFIED
#define G_FILE_ATTRIBUTE_RECENT_MODIFIED "recent::modified" /* int64 (time_t) */
A key in the "recent" namespace for getting time, when the metadata for the
file in recent:/// was last changed. Corresponding GFileAttributeType is
G_FILE_ATTRIBUTE_TYPE_INT64.
Since: 2.52