⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gio-gfileattribute.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>GFileAttribute</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="GIO Reference Manual"><link rel="up" href="file_ops.html" title="File Operations"><link rel="prev" href="GFile.html" title="GFile"><link rel="next" href="GFileInfo.html" title="GFileInfo"><meta name="generator" content="GTK-Doc V1.9 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="pt01.html" title="Part&#160;I.&#160;GIO Overview"><link rel="chapter" href="ch01.html" title="Introduction"><link rel="chapter" href="ch02.html" title="Compiling GIO applications"><link rel="chapter" href="ch03.html" title="Running GIO applications"><link rel="chapter" href="gio-extension-points.html" title="Extending GIO"><link rel="part" href="pt02.html" title="Part&#160;II.&#160;API Reference"><link rel="chapter" href="file_ops.html" title="File Operations"><link rel="chapter" href="file_mon.html" title="File System Monitoring"><link rel="chapter" href="async.html" title="Asynchronous I/O"><link rel="chapter" href="streaming.html" title="Streaming I/O"><link rel="chapter" href="types.html" title="File types and applications"><link rel="chapter" href="volume_mon.html" title="Volumes and Drives"><link rel="chapter" href="icons.html" title="Icons"><link rel="chapter" href="utils.html" title="Utilities"><link rel="chapter" href="extending.html" title="Extending GIO"><link rel="part" href="migrating.html" title="Part&#160;III.&#160;Migrating to GIO"><link rel="chapter" href="ch14.html" title="Migrating from POSIX to GIO"><link rel="chapter" href="ch15.html" title="Migrating from GnomeVFS to GIO"><link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy"><link rel="index" href="ix01.html" title="Index"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GFile.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="file_ops.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GIO Reference Manual</th><td><a accesskey="n" href="GFileInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id3105328" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#id3122309" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="gio-GFileAttribute"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id3105328"></a><span class="refentrytitle">GFileAttribute</span></h2><p>GFileAttribute &#8212; Key-Value Paired File Attributes</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;gio/gio.h&gt;enum                <a class="link" href="gio-GFileAttribute.html#GFileAttributeType">GFileAttributeType</a>;enum                <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoFlags">GFileAttributeInfoFlags</a>;enum                <a class="link" href="gio-GFileAttribute.html#GFileAttributeStatus">GFileAttributeStatus</a>;                    <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo">GFileAttributeInfo</a>;                    <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>;<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-new">g_file_attribute_info_list_new</a>  (void);<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-ref">g_file_attribute_info_list_ref</a>  (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);void                <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-unref">g_file_attribute_info_list_unref</a>    (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-dup">g_file_attribute_info_list_dup</a>  (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);const <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo">GFileAttributeInfo</a>* <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-lookup">g_file_attribute_info_list_lookup</a>                                                        (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list,                                                         const char *name);void                <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-add">g_file_attribute_info_list_add</a>      (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list,                                                         const char *name,                                                         <a class="link" href="gio-GFileAttribute.html#GFileAttributeType">GFileAttributeType</a> type,                                                         <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoFlags">GFileAttributeInfoFlags</a> flags);</pre></div><div class="refsect1" lang="en"><a name="id3122309"></a><h2>Description</h2><p>File attributes in GIO consist of a list of key-value pairs. </p><p>Keys are strings that contain a key namespace and a key name, separatedby a colon, e.g. "namespace:keyname". Namespaces are included to sortkey-value pairs by namespaces for relevance. Keys can be retrived using wildcards, e.g. "standard::*" will return all of the keys in the "standard" namespace.</p><p>Values are stored within the list in <span class="type">GFileAttributeValue</span> structures.Values can store different types, listed in the enum <a class="link" href="gio-GFileAttribute.html#GFileAttributeType"><span class="type">GFileAttributeType</span></a>.Upon creation of a <span class="type">GFileAttributeValue</span>, the type will be set to <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-INVALID:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_INVALID</code></a>. </p><p>The list of possible attributes for a filesystem (pointed to by a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>) isavailible as a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a>. This list is queryable by key names as indicated earlier.</p><p>Classes that implement <a class="link" href="GFile.html#GFileIface"><span class="type">GFileIface</span></a> will create a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> and install default keys and values for their given file system, architecture, and other possible implementation details (e.g., on a UNIX system, a file attribute key will be registered for the user id for a given file).</p><p></p><p></p><div class="table"><a name="id3108911"></a><p class="title"><b>Table&#160;1.&#160;GFileAttributes Default Namespaces</b></p><div class="table-contents"><table summary="GFileAttributes Default Namespaces" border="1"><colgroup><col><col></colgroup><thead><tr><th align="left">Namspace</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left">"standard"</td><td align="left">The "Standard" namespace. General fileinformation that any application may need should be put in this namespace. Examples include the file's name, type, and size.</td></tr><tr><td align="left">"etag"</td><td align="left">The <a class="link" href="GFile.html#gfile-etag">"Entity Tag"</a> namespace. Currently, the only key in this namespace is "value", which contains the value of the current entity tag.</td></tr><tr><td align="left">"id"</td><td align="left">The "Identification" namespace. This namespace is used by file managers and applications that list directoriesto check for loops and to uniquely identify files.</td></tr><tr><td align="left">"access"</td><td align="left">The "Access" namespace. Used to checkif a user has the proper privilidges to access files and performfile operations. Keys in this namespace are made to be generic and easily understood, e.g. the "can_read" key is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the current user has permission to read the file. UNIX permissions andNTFS ACLs in Windows should be mapped to these values.</td></tr><tr><td align="left">"mountable"</td><td align="left">The "Mountable" namespace. Includes simple boolean keys for checking if a file or path supports mount operations, e.g.mount, unmount, eject. These are used for files of type <a class="link" href="GFileInfo.html#G-FILE-TYPE-MOUNTABLE:CAPS"><code class="literal">G_FILE_TYPE_MOUNTABLE</code></a>.</td></tr><tr><td align="left">"time"</td><td align="left">The "Time" namespace. Includes file access, changed, created times. </td></tr><tr><td align="left">"unix"</td><td align="left">The "Unix" namespace. Includes UNIX-specificinformation and may not be available for all files. Examples include the UNIX "UID", "GID", etc.</td></tr><tr><td align="left">"dos"</td><td align="left">The "DOS" namespace. Includes DOS-specific information and may not be available for all files. Examples include"is_system" for checking if a file is marked as a system file, and "is_archive"for checking if a file is marked as an archive file.</td></tr><tr><td align="left">"owner"</td><td align="left">The "Owner" namespace. Includes informationabout who owns a file. May not be available for all file systems. Examples include"user" for getting the user name of the file owner. This information is often mapped fromsome backend specific data such as a unix UID.</td></tr><tr><td align="left">"thumbnail"</td><td align="left">The "Thumbnail" namespace. Includes 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"to check if thumbnailing of the file failed.</td></tr><tr><td align="left">"filesystem"</td><td align="left">The "Filesystem" namespace. Gets informationabout the file system where a file is located, such as its type, how muchspace is left available, and the overall size of the file system.</td></tr><tr><td align="left">"gvfs"</td><td align="left">The "GVFS" namespace. Keys in this namespacecontain information about the current GVFS backend in use. </td></tr><tr><td align="left">"xattr"</td><td align="left">The "xattr" namespace. Gets information about extended user attributes. See attr(5). The "user." prefix of theextended user attribute name is stripped away when constructing keys inthis namespace, e.g. "xattr::mime_type" for the extended attribute with the name "user.mime_type". Note that this information is only availableif GLib has been built with extended attribute support.</td></tr><tr><td align="left">"xattr-sys"</td><td align="left">The "xattr-sys" namespace. Gets information about extended attributes which are not user-specific. See attr(5). Note that this information is only available if GLibhas been built with extended attribute support.</td></tr><tr><td align="left">"selinux"</td><td align="left">The "SELinux" namespace. Includesinformation about the SELinux context of files. Note that this informationis only available if GLib has been built with SELinux support.</td></tr></tbody></table></div></div><p><br class="table-break"></p><p></p><p>Please note that these are not all of the possible namespaces.More namespaces can be added from GIO modules or by individual applications. For more information about writing GIO modules, see <a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a>.</p><p></p><p></p><div class="table"><a name="id3060694"></a><p class="title"><b>Table&#160;2.&#160;GFileAttributes Built-in Keys and Value Types</b></p><div class="table-contents"><table summary="GFileAttributes Built-in Keys and Value Types" border="1"><colgroup><col><col><col></colgroup><thead><tr><th align="left">Enum Value</th><th align="left">Namespace:Key</th><th align="left">Value Type</th></tr></thead><tbody><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-TYPE:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_TYPE</code></a></td><td align="left">standard::type</td><td align="left">uint32 (<a class="link" href="GFileInfo.html#GFileType"><span class="type">GFileType</span></a>)</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-IS-HIDDEN:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</code></a></td><td align="left">standard::is-hidden</td><td align="left">boolean</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-IS-BACKUP:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</code></a></td><td align="left">standard::is-backup</td><td align="left">boolean</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-IS-SYMLINK:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</code></a></td><td align="left">standard::is-symlink</td><td align="left">boolean</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-IS-VIRTUAL:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</code></a></td><td align="left">standard::is-virtual</td><td align="left">boolean</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-NAME:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_NAME</code></a></td><td align="left">standard::name</td><td align="left">byte string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></a></td><td align="left">standard::display-name</td><td align="left">string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-EDIT-NAME:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</code></a></td><td align="left">standard::edit-name</td><td align="left">string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-ICON:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_ICON</code></a></td><td align="left">standard::icon</td><td align="left">object (<a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>)</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-CONTENT-TYPE:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</code></a></td><td align="left">standard::content-type</td><td align="left">string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-FAST-CONTENT-TYPE:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</code></a></td><td align="left">standard::fast-content-type</td><td align="left">string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-SIZE:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_SIZE</code></a></td><td align="left">standard::size</td><td align="left">uint64</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-SYMLINK-TARGET:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</code></a></td><td align="left">standard::symlink-target</td><td align="left">byte string</td></tr><tr><td align="left"><a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-TARGET-URI:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</code></a></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -