15.9. Using GVFS Metadata
GVFShas its metadata storage implemented as a set of simple key/value pairs information bound to a particular file. Thus, there is a tool for a user or application to save small data designed for runtime information such as icon position, last-played location, position in a document, emblems, notes, and so on.
GVFSstores all metadata privately so it is available only on the machine. However,
GVFSmounts and removable media are tracked as well.
/run/media/instead of the
- or any other native GIO way of working with attributes.
gvfs-infocalls and data persistence after a move or rename (note the
Example 15.5. Setting Custom Metadata Attribute
$ touch /tmp/myfile $ gvfs-info -a 'metadata::*' /tmp/myfile attributes: $ gvfs-set-attribute -t string /tmp/myfile 'metadata::mynote' 'Please remember to delete this file!' $ gvfs-info -a 'metadata::*' /tmp/myfile attributes: metadata::mynote: Please remember to delete this file! $ gvfs-move /tmp/myfile /tmp/newfile $ gvfs-info -a 'metadata::*' /tmp/newfile attributes: metadata::mynote: Please remember to delete this file!