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

📄 gio-gfileattribute.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</div><hr><div class="refsect2" lang="en"><a name="id3132902"></a><h3><a name="GFileAttributeInfoFlags"></a>enum GFileAttributeInfoFlags</h3><a class="indexterm" name="id3132914"></a><pre class="programlisting">typedef enum {  G_FILE_ATTRIBUTE_INFO_NONE = 0,  G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = 1 &lt;&lt; 0,  G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = 1 &lt;&lt; 1} GFileAttributeInfoFlags;</pre><p>Flags specifying the behaviour of an attribute.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-INFO-NONE:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_INFO_NONE</code></span></p></td><td> no flags set.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-INFO-COPY-WITH-FILE:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</code></span></p></td><td> copy the attribute values when the file is copied.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-INFO-COPY-WHEN-MOVED:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</code></span></p></td><td> copy the attribute values when the file is moved.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133012"></a><h3><a name="GFileAttributeStatus"></a>enum GFileAttributeStatus</h3><a class="indexterm" name="id3133023"></a><pre class="programlisting">typedef enum {  G_FILE_ATTRIBUTE_STATUS_UNSET = 0,  G_FILE_ATTRIBUTE_STATUS_SET,  G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING} GFileAttributeStatus;</pre><p>Used by <a class="link" href="GFile.html#g-file-set-attributes-from-info"><code class="function">g_file_set_attributes_from_info()</code></a> when setting file attributes.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-STATUS-UNSET:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_STATUS_UNSET</code></span></p></td><td> Attribute value is unset (empty).</td></tr><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-STATUS-SET:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_STATUS_SET</code></span></p></td><td> Attribute value is set.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ATTRIBUTE-STATUS-ERROR-SETTING:CAPS"></a><code class="literal">G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING</code></span></p></td><td> Indicates an error in setting the value.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133128"></a><h3><a name="GFileAttributeInfo"></a>GFileAttributeInfo</h3><a class="indexterm" name="id3133140"></a><pre class="programlisting">typedef struct {  char *name;  GFileAttributeType type;  GFileAttributeInfoFlags flags;} GFileAttributeInfo;</pre><p>Information about a specific attribute.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term">char&#160;*<em class="structfield"><code>name</code></em>;</span></p></td><td> the name of the attribute.</td></tr><tr><td><p><span class="term"><a class="link" href="gio-GFileAttribute.html#GFileAttributeType">GFileAttributeType</a>&#160;<em class="structfield"><code>type</code></em>;</span></p></td><td> the <a class="link" href="gio-GFileAttribute.html#GFileAttributeType"><span class="type">GFileAttributeType</span></a> type of the attribute.</td></tr><tr><td><p><span class="term"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoFlags">GFileAttributeInfoFlags</a>&#160;<em class="structfield"><code>flags</code></em>;</span></p></td><td> a set of <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoFlags"><span class="type">GFileAttributeInfoFlags</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133242"></a><h3><a name="GFileAttributeInfoList"></a>GFileAttributeInfoList</h3><a class="indexterm" name="id3133253"></a><pre class="programlisting">typedef struct {  GFileAttributeInfo *infos;  int n_infos;} GFileAttributeInfoList;</pre><p>Acts as a lightweight registry for possible valid file attributes.The registry stores Key-Value pair formats as <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo"><span class="type">GFileAttributeInfo</span></a>s.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo">GFileAttributeInfo</a>&#160;*<em class="structfield"><code>infos</code></em>;</span></p></td><td> an array of <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo"><span class="type">GFileAttributeInfo</span></a>s.</td></tr><tr><td><p><span class="term">int&#160;<em class="structfield"><code>n_infos</code></em>;</span></p></td><td> the number of values in the array.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133339"></a><h3><a name="g-file-attribute-info-list-new"></a>g_file_attribute_info_list_new ()</h3><a class="indexterm" name="id3133352"></a><pre class="programlisting"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* g_file_attribute_info_list_new  (void);</pre><p>Creates a new file attribute info list.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133399"></a><h3><a name="g-file-attribute-info-list-ref"></a>g_file_attribute_info_list_ref ()</h3><a class="indexterm" name="id3133412"></a><pre class="programlisting"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* g_file_attribute_info_list_ref  (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);</pre><p>References a file attribute info list.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> to reference.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133495"></a><h3><a name="g-file-attribute-info-list-unref"></a>g_file_attribute_info_list_unref ()</h3><a class="indexterm" name="id3133508"></a><pre class="programlisting">void                g_file_attribute_info_list_unref    (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);</pre><p>Removes a reference from the given <em class="parameter"><code>list</code></em>. If the reference countfalls to zero, the <em class="parameter"><code>list</code></em> is deleted.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td><td> The <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> to unreference.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133578"></a><h3><a name="g-file-attribute-info-list-dup"></a>g_file_attribute_info_list_dup ()</h3><a class="indexterm" name="id3133591"></a><pre class="programlisting"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a>* g_file_attribute_info_list_dup  (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list);</pre><p>Makes a duplicate of a file attribute info list.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> to duplicate.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a copy of the given <em class="parameter"><code>list</code></em>. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133663"></a><h3><a name="g-file-attribute-info-list-lookup"></a>g_file_attribute_info_list_lookup ()</h3><a class="indexterm" name="id3133677"></a><pre class="programlisting">const <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo">GFileAttributeInfo</a>* g_file_attribute_info_list_lookup                                                        (<a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList">GFileAttributeInfoList</a> *list,                                                         const char *name);</pre><p>Gets the file attribute with the name <em class="parameter"><code>name</code></em> from <em class="parameter"><code>list</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></p></td><td> the name of the attribute to lookup.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfo"><span class="type">GFileAttributeInfo</span></a> for the <em class="parameter"><code>name</code></em>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if an attribute isn't found.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3133803"></a><h3><a name="g-file-attribute-info-list-add"></a>g_file_attribute_info_list_add ()</h3><a class="indexterm" name="id3133816"></a><pre class="programlisting">void                g_file_attribute_info_list_add      (<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><p>Adds a new attribute with <em class="parameter"><code>name</code></em> to the <em class="parameter"><code>list</code></em>, settingits <em class="parameter"><code>type</code></em> and <em class="parameter"><code>flags</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td><td> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></p></td><td> the name of the attribute to add.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td><td> the <a class="link" href="gio-GFileAttribute.html#GFileAttributeType"><span class="type">GFileAttributeType</span></a> for the attribute.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoFlags"><span class="type">GFileAttributeInfoFlags</span></a> for the attribute.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3152001"></a><h2>See Also</h2><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a></div><div class="refsect1" lang="en"><a name="id3152022"></a><div class="refsect2" lang="en"><a name="id3152023"></a></div><hr><div class="refsect2" lang="en"><a name="id3152024"></a></div></div></div></body></html>

⌨️ 快捷键说明

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