mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
File attribute renames: std:: -> standard:: fs:: -> filesystem:: id::fs ->
2007-12-20 Alexander Larsson <alexl@redhat.com> * gfile.c: * gfileattribute.c: * gfileinfo.c: * gfileinfo.h: * gfilenamecompleter.c: * glocalfile.c: * glocalfileinfo.c: * gpollfilemonitor.c: File attribute renames: std:: -> standard:: fs:: -> filesystem:: id::fs -> id::filesystem svn path=/trunk/; revision=6170
This commit is contained in:
parent
33c055feb1
commit
71768c8426
@ -1,3 +1,18 @@
|
|||||||
|
2007-12-20 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gfile.c:
|
||||||
|
* gfileattribute.c:
|
||||||
|
* gfileinfo.c:
|
||||||
|
* gfileinfo.h:
|
||||||
|
* gfilenamecompleter.c:
|
||||||
|
* glocalfile.c:
|
||||||
|
* glocalfileinfo.c:
|
||||||
|
* gpollfilemonitor.c:
|
||||||
|
File attribute renames:
|
||||||
|
std:: -> standard::
|
||||||
|
fs:: -> filesystem::
|
||||||
|
id::fs -> id::filesystem
|
||||||
|
|
||||||
2007-12-20 Alexander Larsson <alexl@redhat.com>
|
2007-12-20 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* gfile.[ch]:
|
* gfile.[ch]:
|
||||||
|
28
gio/gfile.c
28
gio/gfile.c
@ -692,9 +692,9 @@ g_file_resolve_relative_path (GFile *file,
|
|||||||
* should be gathered. It is not an error if its not possible to read a particular
|
* should be gathered. It is not an error if its not possible to read a particular
|
||||||
* requested attribute from a file, it just won't be set. @attribute should
|
* requested attribute from a file, it just won't be set. @attribute should
|
||||||
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
||||||
* means all attributes, and a wildcard like "std:*" means all attributes in the std
|
* means all attributes, and a wildcard like "standard::*" means all attributes in the standard
|
||||||
* namespace. An example attribute query be "std:*,owner:user".
|
* namespace. An example attribute query be "standard::*,owner::user".
|
||||||
* The standard attributes are availible as defines, like #G_FILE_ATTRIBUTE_STD_NAME.
|
* The standard attributes are availible as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@ -828,9 +828,9 @@ g_file_enumerate_children_finish (GFile *file,
|
|||||||
* should be gathered. It is not an error if its not possible to read a particular
|
* should be gathered. It is not an error if its not possible to read a particular
|
||||||
* requested attribute from a file, it just won't be set. @attribute should
|
* requested attribute from a file, it just won't be set. @attribute should
|
||||||
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
||||||
* means all attributes, and a wildcard like "std:*" means all attributes in the std
|
* means all attributes, and a wildcard like "standard::*" means all attributes in the standard
|
||||||
* namespace. An example attribute query be "std:*,owner:user".
|
* namespace. An example attribute query be "standard::*,owner::user".
|
||||||
* The standard attributes are availible as defines, like #G_FILE_ATTRIBUTE_STD_NAME.
|
* The standard attributes are availible as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@ -969,9 +969,9 @@ g_file_query_info_finish (GFile *file,
|
|||||||
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
* be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
|
||||||
* means all attributes, and a wildcard like "fs:*" means all attributes in the fs
|
* means all attributes, and a wildcard like "fs:*" means all attributes in the fs
|
||||||
* namespace. The standard namespace for filesystem attributes is "fs".
|
* namespace. The standard namespace for filesystem attributes is "fs".
|
||||||
* Common attributes of interest are #G_FILE_ATTRIBUTE_FS_SIZE
|
* Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
|
||||||
* (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FS_FREE (number of
|
* (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
|
||||||
* bytes availible), and #G_FILE_ATTRIBUTE_FS_TYPE (type of the filesystem).
|
* bytes availible), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@ -1606,7 +1606,7 @@ copy_symlink (GFile *destination,
|
|||||||
|
|
||||||
|
|
||||||
/* Don't overwrite if the destination is a directory */
|
/* Don't overwrite if the destination is a directory */
|
||||||
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STD_TYPE,
|
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
||||||
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||||
cancellable, &my_error);
|
cancellable, &my_error);
|
||||||
if (info != NULL)
|
if (info != NULL)
|
||||||
@ -1664,7 +1664,7 @@ open_source_for_copy (GFile *source,
|
|||||||
g_error_free (my_error);
|
g_error_free (my_error);
|
||||||
my_error = NULL;
|
my_error = NULL;
|
||||||
|
|
||||||
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STD_TYPE,
|
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
||||||
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||||
cancellable, &my_error);
|
cancellable, &my_error);
|
||||||
if (info != NULL)
|
if (info != NULL)
|
||||||
@ -1856,7 +1856,7 @@ copy_stream_with_progress (GInputStream *in,
|
|||||||
|
|
||||||
total_size = 0;
|
total_size = 0;
|
||||||
info = g_file_input_stream_query_info (G_FILE_INPUT_STREAM (in),
|
info = g_file_input_stream_query_info (G_FILE_INPUT_STREAM (in),
|
||||||
G_FILE_ATTRIBUTE_STD_SIZE,
|
G_FILE_ATTRIBUTE_STANDARD_SIZE,
|
||||||
cancellable, NULL);
|
cancellable, NULL);
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
@ -1940,7 +1940,7 @@ file_copy_fallback (GFile *source,
|
|||||||
if (flags & G_FILE_COPY_NOFOLLOW_SYMLINKS)
|
if (flags & G_FILE_COPY_NOFOLLOW_SYMLINKS)
|
||||||
{
|
{
|
||||||
info = g_file_query_info (source,
|
info = g_file_query_info (source,
|
||||||
G_FILE_ATTRIBUTE_STD_TYPE "," G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET,
|
G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
|
||||||
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||||
cancellable,
|
cancellable,
|
||||||
error);
|
error);
|
||||||
@ -2382,7 +2382,7 @@ g_file_trash (GFile *file,
|
|||||||
* filesystem if possible and the @file is renamed to this.
|
* filesystem if possible and the @file is renamed to this.
|
||||||
*
|
*
|
||||||
* If you want to implement a rename operation in the user interface the edit name
|
* If you want to implement a rename operation in the user interface the edit name
|
||||||
* (#G_FILE_ATTRIBUTE_STD_EDIT_NAME) should be used as the initial value in the rename
|
* (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
|
||||||
* widget, and then the result after editing should be passed to g_file_set_display_name().
|
* widget, and then the result after editing should be passed to g_file_set_display_name().
|
||||||
*
|
*
|
||||||
* On success the resulting converted filename is returned.
|
* On success the resulting converted filename is returned.
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
* Keys are strings that contain a key namespace and a key name, separated
|
* Keys are strings that contain a key namespace and a key name, separated
|
||||||
* by a colon, e.g. "namespace:keyname". Namespaces are included to sort
|
* by a colon, e.g. "namespace:keyname". Namespaces are included to sort
|
||||||
* key-value pairs by namespaces for relevance. Keys can be retrived
|
* key-value pairs by namespaces for relevance. Keys can be retrived
|
||||||
* using wildcards, e.g. "std:*" will return all of the keys in the
|
* using wildcards, e.g. "standard::*" will return all of the keys in the
|
||||||
* "std" namespace.
|
* "standard" namespace.
|
||||||
*
|
*
|
||||||
* Values are stored within the list in #GFileAttributeValue structures.
|
* Values are stored within the list in #GFileAttributeValue structures.
|
||||||
* Values can store different types, listed in the enum #GFileAttributeType.
|
* Values can store different types, listed in the enum #GFileAttributeType.
|
||||||
@ -66,7 +66,7 @@
|
|||||||
* <row><entry>Namspace</entry><entry>Description</entry></row>
|
* <row><entry>Namspace</entry><entry>Description</entry></row>
|
||||||
* </thead>
|
* </thead>
|
||||||
* <tbody>
|
* <tbody>
|
||||||
* <row><entry>"std"</entry><entry>The "Standard" namespace. General file
|
* <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
|
||||||
* information that any application may need should be put in this namespace.
|
* information that any application may need should be put in this namespace.
|
||||||
* Examples include the file's name, type, and size.</entry></row>
|
* Examples include the file's name, type, and size.</entry></row>
|
||||||
* <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
|
* <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
* information about file thumbnails and their location within the file system. Exaples of
|
* information about file thumbnails and their location within the file system. Exaples of
|
||||||
* keys in this namespace include "path" to get the location of a thumbnail, and "failed"
|
* keys in this namespace include "path" to get the location of a thumbnail, and "failed"
|
||||||
* to check if thumbnailing of the file failed.</entry></row>
|
* to check if thumbnailing of the file failed.</entry></row>
|
||||||
* <row><entry>"fs"</entry><entry>The "Filesystem" namespace. Gets information
|
* <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
|
||||||
* about the file system where a file is located, such as its type, how much
|
* about the file system where a file is located, such as its type, how much
|
||||||
* space is left available, and the overall size of the file system.</entry></row>
|
* space is left available, and the overall size of the file system.</entry></row>
|
||||||
* <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
|
* <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
|
||||||
@ -123,24 +123,24 @@
|
|||||||
* <tgroup cols='3' align='left'><thead>
|
* <tgroup cols='3' align='left'><thead>
|
||||||
* <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
|
* <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
|
||||||
* </thead><tbody>
|
* </thead><tbody>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_TYPE</entry><entry>std::type</entry><entry>uint32 (#GFileType)</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_IS_HIDDEN</entry><entry>std::is-hidden</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_IS_BACKUP</entry><entry>std::is-backup</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_IS_SYMLINK</entry><entry>std::is-symlink</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_IS_VIRTUAL</entry><entry>std::is-virtual</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_NAME</entry><entry>std::name</entry><entry>byte string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_DISPLAY_NAME</entry><entry>std::display-name</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_EDIT_NAME</entry><entry>std::edit-name</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_ICON</entry><entry>std::icon</entry><entry>object (#GIcon)</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_CONTENT_TYPE</entry><entry>std::content-type</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE</entry><entry>std::fast-content-type</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_SIZE</entry><entry>std::size</entry><entry>uint64</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET</entry><entry>std::symlink-target</entry><entry>byte string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_TARGET_URI</entry><entry>std::target-uri</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_STD_SORT_ORDER</entry><entry>std::sort-order</entry><entry>int32</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ID_FS</entry><entry>id::fs</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
|
||||||
@ -177,10 +177,10 @@
|
|||||||
* <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_FS_SIZE</entry><entry>fs::size</entry><entry>uint64</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_FS_FREE</entry><entry>fs::free</entry><entry>uint64</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_FS_TYPE</entry><entry>fs::type</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_FS_READONLY</entry><entry>fs::readonly</entry><entry>boolean</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
|
||||||
* <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
|
* <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
|
||||||
* </tbody></tgroup></table></para>
|
* </tbody></tgroup></table></para>
|
||||||
*
|
*
|
||||||
|
@ -1107,7 +1107,7 @@ g_file_info_get_file_type (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_TYPE_UNKNOWN);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_TYPE_UNKNOWN);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_TYPE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_TYPE);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return (GFileType)_g_file_attribute_value_get_uint32 (value);
|
return (GFileType)_g_file_attribute_value_get_uint32 (value);
|
||||||
@ -1130,7 +1130,7 @@ g_file_info_get_is_hidden (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_IS_HIDDEN);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
||||||
@ -1153,7 +1153,7 @@ g_file_info_get_is_backup (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_IS_BACKUP);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
||||||
@ -1176,7 +1176,7 @@ g_file_info_get_is_symlink (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_IS_SYMLINK);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
return (GFileType)_g_file_attribute_value_get_boolean (value);
|
||||||
@ -1199,7 +1199,7 @@ g_file_info_get_name (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_NAME);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_byte_string (value);
|
return _g_file_attribute_value_get_byte_string (value);
|
||||||
@ -1222,7 +1222,7 @@ g_file_info_get_display_name (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_DISPLAY_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_string (value);
|
return _g_file_attribute_value_get_string (value);
|
||||||
@ -1245,7 +1245,7 @@ g_file_info_get_edit_name (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_EDIT_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_string (value);
|
return _g_file_attribute_value_get_string (value);
|
||||||
@ -1269,7 +1269,7 @@ g_file_info_get_icon (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_ICON);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_ICON);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
obj = _g_file_attribute_value_get_object (value);
|
obj = _g_file_attribute_value_get_object (value);
|
||||||
@ -1295,7 +1295,7 @@ g_file_info_get_content_type (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_CONTENT_TYPE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_string (value);
|
return _g_file_attribute_value_get_string (value);
|
||||||
@ -1318,7 +1318,7 @@ g_file_info_get_size (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), (goffset) 0);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), (goffset) 0);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SIZE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SIZE);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return (goffset) _g_file_attribute_value_get_uint64 (value);
|
return (goffset) _g_file_attribute_value_get_uint64 (value);
|
||||||
@ -1371,7 +1371,7 @@ g_file_info_get_symlink_target (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_byte_string (value);
|
return _g_file_attribute_value_get_byte_string (value);
|
||||||
@ -1406,9 +1406,9 @@ g_file_info_get_etag (GFileInfo *info)
|
|||||||
* @info: a #GFileInfo.
|
* @info: a #GFileInfo.
|
||||||
*
|
*
|
||||||
* Gets the value of the sort_order attribute from the #GFileInfo.
|
* Gets the value of the sort_order attribute from the #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_SORT_ORDER.
|
* See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
|
||||||
*
|
*
|
||||||
* Returns: a #gint32 containing the value of the "std:sort_order" attribute.
|
* Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
|
||||||
**/
|
**/
|
||||||
gint32
|
gint32
|
||||||
g_file_info_get_sort_order (GFileInfo *info)
|
g_file_info_get_sort_order (GFileInfo *info)
|
||||||
@ -1419,7 +1419,7 @@ g_file_info_get_sort_order (GFileInfo *info)
|
|||||||
g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
|
g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SORT_ORDER);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
|
||||||
|
|
||||||
value = g_file_info_find_value (info, attr);
|
value = g_file_info_find_value (info, attr);
|
||||||
return _g_file_attribute_value_get_int32 (value);
|
return _g_file_attribute_value_get_int32 (value);
|
||||||
@ -1432,7 +1432,7 @@ g_file_info_get_sort_order (GFileInfo *info)
|
|||||||
* @type: a #GFileType.
|
* @type: a #GFileType.
|
||||||
*
|
*
|
||||||
* Sets the file type in a #GFileInfo to @type.
|
* Sets the file type in a #GFileInfo to @type.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_TYPE.
|
* See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_file_type (GFileInfo *info,
|
g_file_info_set_file_type (GFileInfo *info,
|
||||||
@ -1444,7 +1444,7 @@ g_file_info_set_file_type (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_TYPE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_TYPE);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1457,7 +1457,7 @@ g_file_info_set_file_type (GFileInfo *info,
|
|||||||
* @is_hidden: a #gboolean.
|
* @is_hidden: a #gboolean.
|
||||||
*
|
*
|
||||||
* Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
|
* Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_IS_HIDDEN.
|
* See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_is_hidden (GFileInfo *info,
|
g_file_info_set_is_hidden (GFileInfo *info,
|
||||||
@ -1469,7 +1469,7 @@ g_file_info_set_is_hidden (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_IS_HIDDEN);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1482,7 +1482,7 @@ g_file_info_set_is_hidden (GFileInfo *info,
|
|||||||
* @is_symlink: a #gboolean.
|
* @is_symlink: a #gboolean.
|
||||||
*
|
*
|
||||||
* Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
|
* Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_IS_SYMLINK.
|
* See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_is_symlink (GFileInfo *info,
|
g_file_info_set_is_symlink (GFileInfo *info,
|
||||||
@ -1494,7 +1494,7 @@ g_file_info_set_is_symlink (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_IS_SYMLINK);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1507,7 +1507,7 @@ g_file_info_set_is_symlink (GFileInfo *info,
|
|||||||
* @name: a string containing a name.
|
* @name: a string containing a name.
|
||||||
*
|
*
|
||||||
* Sets the name attribute for the current #GFileInfo.
|
* Sets the name attribute for the current #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_NAME.
|
* See %G_FILE_ATTRIBUTE_STANDARD_NAME.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_name (GFileInfo *info,
|
g_file_info_set_name (GFileInfo *info,
|
||||||
@ -1520,7 +1520,7 @@ g_file_info_set_name (GFileInfo *info,
|
|||||||
g_return_if_fail (name != NULL);
|
g_return_if_fail (name != NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_NAME);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1533,7 +1533,7 @@ g_file_info_set_name (GFileInfo *info,
|
|||||||
* @display_name: a string containing a display name.
|
* @display_name: a string containing a display name.
|
||||||
*
|
*
|
||||||
* Sets the display name for the current #GFileInfo.
|
* Sets the display name for the current #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_DISPLAY_NAME.
|
* See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_display_name (GFileInfo *info,
|
g_file_info_set_display_name (GFileInfo *info,
|
||||||
@ -1546,7 +1546,7 @@ g_file_info_set_display_name (GFileInfo *info,
|
|||||||
g_return_if_fail (display_name != NULL);
|
g_return_if_fail (display_name != NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_DISPLAY_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1559,7 +1559,7 @@ g_file_info_set_display_name (GFileInfo *info,
|
|||||||
* @edit_name: a string containing an edit name.
|
* @edit_name: a string containing an edit name.
|
||||||
*
|
*
|
||||||
* Sets the edit name for the current file.
|
* Sets the edit name for the current file.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_EDIT_NAME.
|
* See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_edit_name (GFileInfo *info,
|
g_file_info_set_edit_name (GFileInfo *info,
|
||||||
@ -1572,7 +1572,7 @@ g_file_info_set_edit_name (GFileInfo *info,
|
|||||||
g_return_if_fail (edit_name != NULL);
|
g_return_if_fail (edit_name != NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_EDIT_NAME);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1585,7 +1585,7 @@ g_file_info_set_edit_name (GFileInfo *info,
|
|||||||
* @icon: a #GIcon.
|
* @icon: a #GIcon.
|
||||||
*
|
*
|
||||||
* Sets the icon for a given #GFileInfo.
|
* Sets the icon for a given #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_ICON.
|
* See %G_FILE_ATTRIBUTE_STANDARD_ICON.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_icon (GFileInfo *info,
|
g_file_info_set_icon (GFileInfo *info,
|
||||||
@ -1598,7 +1598,7 @@ g_file_info_set_icon (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_ICON (icon));
|
g_return_if_fail (G_IS_ICON (icon));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_ICON);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_ICON);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1611,7 +1611,7 @@ g_file_info_set_icon (GFileInfo *info,
|
|||||||
* @content_type: a content type. See #GContentType.
|
* @content_type: a content type. See #GContentType.
|
||||||
*
|
*
|
||||||
* Sets the content type attribute for a given #GFileInfo.
|
* Sets the content type attribute for a given #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_CONTENT_TYPE.
|
* See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_content_type (GFileInfo *info,
|
g_file_info_set_content_type (GFileInfo *info,
|
||||||
@ -1624,7 +1624,7 @@ g_file_info_set_content_type (GFileInfo *info,
|
|||||||
g_return_if_fail (content_type != NULL);
|
g_return_if_fail (content_type != NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_CONTENT_TYPE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1636,7 +1636,7 @@ g_file_info_set_content_type (GFileInfo *info,
|
|||||||
* @info: a #GFileInfo.
|
* @info: a #GFileInfo.
|
||||||
* @size: a #goffset containing the file's size.
|
* @size: a #goffset containing the file's size.
|
||||||
*
|
*
|
||||||
* Sets the %G_FILE_ATTRIBUTE_STD_SIZE attribute in the file info
|
* Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
|
||||||
* to the given size.
|
* to the given size.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
@ -1649,7 +1649,7 @@ g_file_info_set_size (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SIZE);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SIZE);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1693,7 +1693,7 @@ g_file_info_set_modification_time (GFileInfo *info,
|
|||||||
* @info: a #GFileInfo.
|
* @info: a #GFileInfo.
|
||||||
* @symlink_target: a static string containing a path to a symlink target.
|
* @symlink_target: a static string containing a path to a symlink target.
|
||||||
*
|
*
|
||||||
* Sets the %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET attribute in the file info
|
* Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
|
||||||
* to the given symlink target.
|
* to the given symlink target.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
@ -1707,7 +1707,7 @@ g_file_info_set_symlink_target (GFileInfo *info,
|
|||||||
g_return_if_fail (symlink_target != NULL);
|
g_return_if_fail (symlink_target != NULL);
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1720,7 +1720,7 @@ g_file_info_set_symlink_target (GFileInfo *info,
|
|||||||
* @sort_order: a sort order integer.
|
* @sort_order: a sort order integer.
|
||||||
*
|
*
|
||||||
* Sets the sort order attribute in the file info structure. See
|
* Sets the sort order attribute in the file info structure. See
|
||||||
* %G_FILE_ATTRIBUTE_STD_SORT_ORDER.
|
* %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_sort_order (GFileInfo *info,
|
g_file_info_set_sort_order (GFileInfo *info,
|
||||||
@ -1732,7 +1732,7 @@ g_file_info_set_sort_order (GFileInfo *info,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
attr = lookup_attribute (G_FILE_ATTRIBUTE_STD_SORT_ORDER);
|
attr = lookup_attribute (G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
|
||||||
|
|
||||||
value = g_file_info_create_value (info, attr);
|
value = g_file_info_create_value (info, attr);
|
||||||
if (value)
|
if (value)
|
||||||
@ -1813,7 +1813,7 @@ matcher_add (GFileAttributeMatcher *matcher,
|
|||||||
*
|
*
|
||||||
* The @attribute string should be formatted with specific keys separated
|
* The @attribute string should be formatted with specific keys separated
|
||||||
* from namespaces with a double colon. Several "namespace::key" strings may be
|
* from namespaces with a double colon. Several "namespace::key" strings may be
|
||||||
* concatenated with a single comma (e.g. "std::type,std::is-hidden").
|
* concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
|
||||||
* The wildcard "*" may be used to match all keys and namespaces, or
|
* The wildcard "*" may be used to match all keys and namespaces, or
|
||||||
* "namespace::*" will match all keys in a given namespace.
|
* "namespace::*" will match all keys in a given namespace.
|
||||||
*
|
*
|
||||||
@ -1824,9 +1824,9 @@ matcher_add (GFileAttributeMatcher *matcher,
|
|||||||
* <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
|
* <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
|
||||||
* <tbody>
|
* <tbody>
|
||||||
* <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
|
* <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
|
||||||
* <row><entry>"std::is-hidden"</entry><entry>matches only the key is-hidden in the std namespace.</entry></row>
|
* <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
|
||||||
* <row><entry>"std::type,unix::*"</entry><entry>matches the type key in the std namespace and all keys in the unix
|
* <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
|
||||||
* namespace.</entry></row>
|
* all keys in the unix namespace.</entry></row>
|
||||||
* </tbody></tgroup>
|
* </tbody></tgroup>
|
||||||
* </table>
|
* </table>
|
||||||
*
|
*
|
||||||
@ -2031,7 +2031,7 @@ g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher,
|
|||||||
*
|
*
|
||||||
* Checks if the matcher will match all of the keys in a given namespace.
|
* 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
|
* This will always return %TRUE if a wildcard character is in use (e.g. if
|
||||||
* matcher was created with "std::*" and @ns is "std", or if matcher was created
|
* matcher was created with "standard::*" and @ns is "standard", or if matcher was created
|
||||||
* using "*" and namespace is anything.)
|
* using "*" and namespace is anything.)
|
||||||
*
|
*
|
||||||
* TODO: this is awkwardly worded.
|
* TODO: this is awkwardly worded.
|
||||||
|
131
gio/gfileinfo.h
131
gio/gfileinfo.h
@ -82,74 +82,74 @@ typedef enum {
|
|||||||
|
|
||||||
/* Common Attributes: */
|
/* Common Attributes: */
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_TYPE:
|
* G_FILE_ATTRIBUTE_STANDARD_TYPE:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for storing file types.
|
* A key in the "standard" namespace for storing file types.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
|
||||||
* The value for this key should contain a #GFileType.
|
* The value for this key should contain a #GFileType.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_TYPE "std::type" /* uint32 (GFileType) */
|
#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_IS_HIDDEN:
|
* G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for checking if a file is hidden.
|
* A key in the "standard" namespace for checking if a file is hidden.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_IS_HIDDEN "std::is-hidden" /* boolean */
|
#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_IS_BACKUP:
|
* G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for checking if a file is a backup file.
|
* A key in the "standard" namespace for checking if a file is a backup file.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_IS_BACKUP "std::is-backup" /* boolean */
|
#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_IS_SYMLINK:
|
* G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for checking if the file is a 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
|
* Typically the actual type is something else, if we followed the symlink
|
||||||
* to get the type.
|
* to get the type.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_IS_SYMLINK "std::is-symlink" /* boolean */
|
#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_IS_VIRTUAL:
|
* G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for checking if a file is virtual.
|
* A key in the "standard" namespace for checking if a file is virtual.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_IS_VIRTUAL "std::is-virtual" /* boolean */
|
#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_NAME:
|
* G_FILE_ATTRIBUTE_STANDARD_NAME:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the name of the file.
|
* 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,
|
* The name is the on-disk filename which may not be in any known encoding,
|
||||||
* and can thus not be generally displayed as is.
|
* and can thus not be generally displayed as is.
|
||||||
* Use #G_FILE_ATTRIBUTE_STD_DISPLAY_NAME if you need to display the
|
* Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
|
||||||
* name in a user interface.
|
* name in a user interface.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_NAME "std::name" /* byte string */
|
#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name" /* byte string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_DISPLAY_NAME:
|
* G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the display name of the file.
|
* 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
|
* A display name is guaranteed to be in UTF8 and can thus be displayed in
|
||||||
* the UI.
|
* the UI.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_DISPLAY_NAME "std::display-name" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_EDIT_NAME:
|
* G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for edit name of the file.
|
* 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
|
* 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
|
* 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
|
* might contain information you don't want in the new filename (such as
|
||||||
@ -157,12 +157,12 @@ typedef enum {
|
|||||||
*
|
*
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_EDIT_NAME "std::edit-name" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_COPY_NAME:
|
* G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the copy name of the file.
|
* 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
|
* 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
|
* 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
|
* UTF8). This is useful if you want to copy the file to another filesystem that
|
||||||
@ -171,75 +171,75 @@ typedef enum {
|
|||||||
*
|
*
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_COPY_NAME "std::copy-name" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_ICON:
|
* G_FILE_ATTRIBUTE_STANDARD_ICON:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the icon for the file.
|
* A key in the "standard" namespace for getting the icon for the file.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
|
||||||
* The value for this key should contain a #GIcon.
|
* The value for this key should contain a #GIcon.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_ICON "std::icon" /* object (GIcon) */
|
#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon" /* object (GIcon) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_CONTENT_TYPE:
|
* G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the content type of the file.
|
* A key in the "standard" namespace for getting the content type of the file.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
* The value for this key should contain a valid content type.
|
* The value for this key should contain a valid content type.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_CONTENT_TYPE "std::content-type" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE:
|
* G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the 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
|
* 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
|
* only uses the filename to guess it, but it is faster to calculate than the
|
||||||
* regular content type.
|
* regular content type.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE "std::fast-content-type" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_SIZE:
|
* G_FILE_ATTRIBUTE_STANDARD_SIZE:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the file's size (in bytes).
|
* A key in the "standard" namespace for getting the file's size (in bytes).
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_SIZE "std::size" /* uint64 */
|
#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET:
|
* G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the symlink target, if the file
|
* A key in the "standard" namespace for getting the symlink target, if the file
|
||||||
* is a symlink. Corresponding #GFileAttributeType is
|
* is a symlink. Corresponding #GFileAttributeType is
|
||||||
* %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
|
* %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET "std::symlink-target" /* byte string */
|
#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_TARGET_URI:
|
* G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for getting the target URI for the file, in
|
* A key in the "standard" namespace for getting the target URI for the file, in
|
||||||
* the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
|
* the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_TARGET_URI "std::target-uri" /* string */
|
#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_STD_SORT_ORDER:
|
* G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
|
||||||
*
|
*
|
||||||
* A key in the "std" namespace for setting the sort order of a file.
|
* A key in the "standard" namespace for setting the sort order of a file.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
|
||||||
* An example use would be in file managers, which would use this key
|
* 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
|
* 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
|
* should be sorted first, and files without sort order as if sort order
|
||||||
* was zero.
|
* was zero.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_STD_SORT_ORDER "std::sort-order" /* int32 */
|
#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order" /* int32 */
|
||||||
|
|
||||||
/* Entity tags, used to avoid missing updates on save */
|
/* Entity tags, used to avoid missing updates on save */
|
||||||
|
|
||||||
@ -267,14 +267,15 @@ typedef enum {
|
|||||||
#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */
|
#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_ID_FS:
|
* G_FILE_ATTRIBUTE_ID_FILESYSTEM:
|
||||||
*
|
*
|
||||||
* A key in the "id" namespace for getting the file system identifier.
|
* A key in the "id" namespace for getting the file system identifier.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
* An example use would be during listing files, to avoid recursive
|
* An example use would be during drag and drop to see if the source
|
||||||
* directory scanning.
|
* and target are on the same filesystem (default to move) or not (default
|
||||||
|
* to copy).
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_ID_FS "id::fs" /* string */
|
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string */
|
||||||
|
|
||||||
/* Calculated Access Rights for current user */
|
/* Calculated Access Rights for current user */
|
||||||
|
|
||||||
@ -630,39 +631,39 @@ typedef enum {
|
|||||||
/* File system info (for g_file_get_filesystem_info) */
|
/* File system info (for g_file_get_filesystem_info) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_FS_SIZE:
|
* G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
|
||||||
*
|
*
|
||||||
* A key in the "fs" namespace for getting the total size (in bytes) of the file system,
|
* A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
|
||||||
* used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
|
* used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
|
||||||
* is %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
* is %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_FS_SIZE "fs::size" /* uint64 */
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_FS_FREE:
|
* G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
|
||||||
*
|
*
|
||||||
* A key in the "fs" namespace for getting the number of bytes of free space left on the
|
* A key in the "filesystem" namespace for getting the number of bytes of free space left on the
|
||||||
* file system. Corresponding #GFileAttributeType is
|
* file system. Corresponding #GFileAttributeType is
|
||||||
* %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
* %G_FILE_ATTRIBUTE_TYPE_UINT64.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_FS_FREE "fs::free" /* uint64 */
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_FS_TYPE:
|
* G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
|
||||||
*
|
*
|
||||||
* A key in the "fs" namespace for getting the file system's type.
|
* A key in the "filesystem" namespace for getting the file system's type.
|
||||||
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_FS_TYPE "fs::type" /* string */
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type" /* string */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_FS_READONLY:
|
* G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
|
||||||
*
|
*
|
||||||
* A key in the "fs" namespace for checking if the file system is read only.
|
* 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
|
* Is set to %TRUE if the file system is read only. Corresponding
|
||||||
* #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
* #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_FS_READONLY "fs::readonly" /* boolean */
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_GVFS_BACKEND:
|
* G_FILE_ATTRIBUTE_GVFS_BACKEND:
|
||||||
|
@ -318,7 +318,7 @@ schedule_load_basenames (GFilenameCompleter *completer,
|
|||||||
completer->basename_loader = data;
|
completer->basename_loader = data;
|
||||||
|
|
||||||
g_file_enumerate_children_async (dir,
|
g_file_enumerate_children_async (dir,
|
||||||
G_FILE_ATTRIBUTE_STD_NAME "," G_FILE_ATTRIBUTE_STD_TYPE,
|
G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
||||||
0, 0,
|
0, 0,
|
||||||
data->cancellable,
|
data->cancellable,
|
||||||
got_enum, data);
|
got_enum, data);
|
||||||
|
@ -158,7 +158,7 @@ g_local_file_class_init (GLocalFileClass *klass)
|
|||||||
|
|
||||||
#ifdef HAVE_SYMLINK
|
#ifdef HAVE_SYMLINK
|
||||||
g_file_attribute_info_list_add (list,
|
g_file_attribute_info_list_add (list,
|
||||||
G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET,
|
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
|
||||||
G_FILE_ATTRIBUTE_TYPE_BYTE_STRING,
|
G_FILE_ATTRIBUTE_TYPE_BYTE_STRING,
|
||||||
0);
|
0);
|
||||||
#endif
|
#endif
|
||||||
@ -749,7 +749,7 @@ get_mount_info (GFileInfo *fs_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mount_info & MOUNT_INFO_READONLY)
|
if (mount_info & MOUNT_INFO_READONLY)
|
||||||
g_file_info_set_attribute_boolean (fs_info, G_FILE_ATTRIBUTE_FS_READONLY, TRUE);
|
g_file_info_set_attribute_boolean (fs_info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -817,7 +817,7 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
attribute_matcher = g_file_attribute_matcher_new (attributes);
|
attribute_matcher = g_file_attribute_matcher_new (attributes);
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_FS_FREE))
|
G_FILE_ATTRIBUTE_FILESYSTEM_FREE))
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
gchar *localdir = g_path_get_dirname (local->filename);
|
gchar *localdir = g_path_get_dirname (local->filename);
|
||||||
@ -826,14 +826,14 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
|
|
||||||
g_free (localdir);
|
g_free (localdir);
|
||||||
if (GetDiskFreeSpaceExW (wdirname, &li, NULL, NULL))
|
if (GetDiskFreeSpaceExW (wdirname, &li, NULL, NULL))
|
||||||
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_FREE, (guint64)li.QuadPart);
|
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, (guint64)li.QuadPart);
|
||||||
g_free (wdirname);
|
g_free (wdirname);
|
||||||
#else
|
#else
|
||||||
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_FREE, block_size * statfs_buffer.f_bavail);
|
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, block_size * statfs_buffer.f_bavail);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_FS_SIZE))
|
G_FILE_ATTRIBUTE_FILESYSTEM_SIZE))
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
gchar *localdir = g_path_get_dirname (local->filename);
|
gchar *localdir = g_path_get_dirname (local->filename);
|
||||||
@ -842,22 +842,22 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
|
|
||||||
g_free (localdir);
|
g_free (localdir);
|
||||||
if (GetDiskFreeSpaceExW (wdirname, NULL, &li, NULL))
|
if (GetDiskFreeSpaceExW (wdirname, NULL, &li, NULL))
|
||||||
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_SIZE, (guint64)li.QuadPart);
|
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, (guint64)li.QuadPart);
|
||||||
g_free (wdirname);
|
g_free (wdirname);
|
||||||
#else
|
#else
|
||||||
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FS_SIZE, block_size * statfs_buffer.f_blocks);
|
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, block_size * statfs_buffer.f_blocks);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef USE_STATFS
|
#ifdef USE_STATFS
|
||||||
fstype = get_fs_type (statfs_buffer.f_type);
|
fstype = get_fs_type (statfs_buffer.f_type);
|
||||||
if (fstype &&
|
if (fstype &&
|
||||||
g_file_attribute_matcher_matches (attribute_matcher,
|
g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_FS_TYPE))
|
G_FILE_ATTRIBUTE_FILESYSTEM_TYPE))
|
||||||
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FS_TYPE, fstype);
|
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, fstype);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_FS_READONLY))
|
G_FILE_ATTRIBUTE_FILESYSTEM_READONLY))
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
/* need to implement with *unix_mount* */
|
/* need to implement with *unix_mount* */
|
||||||
|
@ -951,10 +951,10 @@ set_info_from_stat (GFileInfo *info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_ID_FS))
|
G_FILE_ATTRIBUTE_ID_FILESYSTEM))
|
||||||
{
|
{
|
||||||
char *id = _g_local_file_info_create_fs_id (statbuf);
|
char *id = _g_local_file_info_create_fs_id (statbuf);
|
||||||
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_ID_FS, id);
|
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM, id);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1424,11 +1424,11 @@ _g_local_file_info_get (const char *basename,
|
|||||||
g_file_info_set_is_hidden (info, TRUE);
|
g_file_info_set_is_hidden (info, TRUE);
|
||||||
|
|
||||||
if (basename != NULL && basename[strlen (basename) -1] == '~')
|
if (basename != NULL && basename[strlen (basename) -1] == '~')
|
||||||
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STD_IS_BACKUP, TRUE);
|
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP, TRUE);
|
||||||
|
|
||||||
if (is_symlink &&
|
if (is_symlink &&
|
||||||
g_file_attribute_matcher_matches (attribute_matcher,
|
g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET))
|
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET))
|
||||||
{
|
{
|
||||||
char *link = read_link (path);
|
char *link = read_link (path);
|
||||||
g_file_info_set_symlink_target (info, link);
|
g_file_info_set_symlink_target (info, link);
|
||||||
@ -1436,7 +1436,7 @@ _g_local_file_info_get (const char *basename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_DISPLAY_NAME))
|
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME))
|
||||||
{
|
{
|
||||||
char *display_name = g_filename_display_basename (path);
|
char *display_name = g_filename_display_basename (path);
|
||||||
|
|
||||||
@ -1451,7 +1451,7 @@ _g_local_file_info_get (const char *basename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_EDIT_NAME))
|
G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME))
|
||||||
{
|
{
|
||||||
char *edit_name = g_filename_display_basename (path);
|
char *edit_name = g_filename_display_basename (path);
|
||||||
g_file_info_set_edit_name (info, edit_name);
|
g_file_info_set_edit_name (info, edit_name);
|
||||||
@ -1460,18 +1460,18 @@ _g_local_file_info_get (const char *basename,
|
|||||||
|
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_COPY_NAME))
|
G_FILE_ATTRIBUTE_STANDARD_COPY_NAME))
|
||||||
{
|
{
|
||||||
char *copy_name = g_filename_to_utf8 (basename, -1, NULL, NULL, NULL);
|
char *copy_name = g_filename_to_utf8 (basename, -1, NULL, NULL, NULL);
|
||||||
if (copy_name)
|
if (copy_name)
|
||||||
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STD_COPY_NAME, copy_name);
|
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_COPY_NAME, copy_name);
|
||||||
g_free (copy_name);
|
g_free (copy_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_CONTENT_TYPE) ||
|
G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE) ||
|
||||||
g_file_attribute_matcher_matches (attribute_matcher,
|
g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_ICON))
|
G_FILE_ATTRIBUTE_STANDARD_ICON))
|
||||||
{
|
{
|
||||||
char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, FALSE);
|
char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, FALSE);
|
||||||
|
|
||||||
@ -1480,7 +1480,7 @@ _g_local_file_info_get (const char *basename,
|
|||||||
g_file_info_set_content_type (info, content_type);
|
g_file_info_set_content_type (info, content_type);
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_ICON))
|
G_FILE_ATTRIBUTE_STANDARD_ICON))
|
||||||
{
|
{
|
||||||
char *mimetype_icon, *generic_mimetype_icon, *type_icon, *p;
|
char *mimetype_icon, *generic_mimetype_icon, *type_icon, *p;
|
||||||
char *icon_names[3];
|
char *icon_names[3];
|
||||||
@ -1531,13 +1531,13 @@ _g_local_file_info_get (const char *basename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE))
|
G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE))
|
||||||
{
|
{
|
||||||
char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, TRUE);
|
char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, TRUE);
|
||||||
|
|
||||||
if (content_type)
|
if (content_type)
|
||||||
{
|
{
|
||||||
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE, content_type);
|
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, content_type);
|
||||||
g_free (content_type);
|
g_free (content_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1961,7 +1961,7 @@ _g_local_file_info_set_attribute (char *filename,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYMLINK
|
#ifdef HAVE_SYMLINK
|
||||||
else if (strcmp (attribute, G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET) == 0)
|
else if (strcmp (attribute, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET) == 0)
|
||||||
return set_symlink (filename, &value, error);
|
return set_symlink (filename, &value, error);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2007,7 +2007,7 @@ _g_local_file_info_set_attributes (char *filename,
|
|||||||
|
|
||||||
/* Set symlink first, since this recreates the file */
|
/* Set symlink first, since this recreates the file */
|
||||||
#ifdef HAVE_SYMLINK
|
#ifdef HAVE_SYMLINK
|
||||||
value = _g_file_info_get_attribute_value (info, G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET);
|
value = _g_file_info_get_attribute_value (info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
if (!set_symlink (filename, value, error))
|
if (!set_symlink (filename, value, error))
|
||||||
|
@ -164,7 +164,7 @@ poll_file_timeout (gpointer data)
|
|||||||
|
|
||||||
poll_monitor->timeout = FALSE;
|
poll_monitor->timeout = FALSE;
|
||||||
|
|
||||||
g_file_query_info_async (poll_monitor->file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STD_SIZE,
|
g_file_query_info_async (poll_monitor->file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STANDARD_SIZE,
|
||||||
0, 0, NULL, got_new_info, g_object_ref (poll_monitor));
|
0, 0, NULL, got_new_info, g_object_ref (poll_monitor));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -211,7 +211,7 @@ _g_poll_file_monitor_new (GFile *file)
|
|||||||
|
|
||||||
poll_monitor->file = g_object_ref (file);
|
poll_monitor->file = g_object_ref (file);
|
||||||
|
|
||||||
g_file_query_info_async (file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STD_SIZE,
|
g_file_query_info_async (file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STANDARD_SIZE,
|
||||||
0, 0, NULL, got_initial_info, g_object_ref (poll_monitor));
|
0, 0, NULL, got_initial_info, g_object_ref (poll_monitor));
|
||||||
|
|
||||||
return G_FILE_MONITOR (poll_monitor);
|
return G_FILE_MONITOR (poll_monitor);
|
||||||
|
Loading…
Reference in New Issue
Block a user