mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 16:33:40 +02:00
fileinfo: Add a G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE attribute
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. Examples of such backends could be a portal for letting sandboxed applications access the file-system, or a database-backed storage like Google Drive. In these cases, the user visible file and folder names are different from the real identifiers, used by the backend. So, a request to create google-drive://user@gmail.com/foo/New\ File, would actually lead to google-drive://user@gmail.com/foo/bar on the server even though the user visible name is still "New File". Since the server-defined URI is persistent and sanity-checked by the backend, it is recommended that applications switch to it as soon as possible. Backends will try to keep a mapping from "fake" to "real" URIs, but those are only on a best effort basis. They might not be persistent or have the same guarantees as the "real" URIs. https://bugzilla.gnome.org/show_bug.cgi?id=741602
This commit is contained in:
@@ -88,6 +88,20 @@ typedef struct _GFileInfoClass GFileInfoClass;
|
||||
**/
|
||||
#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean */
|
||||
|
||||
/**
|
||||
* G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE:
|
||||
*
|
||||
* 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
|
||||
**/
|
||||
#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile" /* boolean */
|
||||
|
||||
/**
|
||||
* G_FILE_ATTRIBUTE_STANDARD_NAME:
|
||||
*
|
||||
|
Reference in New Issue
Block a user