Show Table of Contents
15.9. GVFS メタデータの使用
GVFS では、メタデータの保管が、特定ファイルにバインドされた単純なキー/値のペアのセットとして実装されます。そのためユーザーまたはアプリケーションには、アイコンの位置、最後に再生された場所、文書内の位置、マーク、メモなどのランタイム情報用に設計された小規模なデータを保存するためのツールがあります。
ファイルまたはディレクトリーが移動される際は常に、メタデータも適宜移動するため、メタデータはそれぞれのファイルに接続されたままの状態になります。
GVFS はすべてのメタデータをプライベートに保存するため、データはマシン上でのみ利用可能になります。ただし、GVFSマウントおよびリムーバブルメディアも追跡対象になります。
注記
リムーバブルメディアは、
/media ディレクトリーではなく、/run/media/ にマウントされるようになります。
メタデータを表示し、これを操作するには、以下を使用できます。
gvfs-infoコマンドgvfs-set-attributeコマンド- その他ネイティブ GIO で属性を使用する方法。
以下の例では、カスタムメタデータ属性が設定されています。特定の
gvfs-info 呼び出しと、移動または名前変更後のデータ永続性間の違いに注意してください (gvfs-info コマンド出力に留意してください)。
例15.5 カスタムメタデータ属性の設定
$ 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!

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.