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

📄 glib-file-utilities.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td>No such file or directory.  This is a "file     doesn't exist" error for ordinary files that are referenced in     contexts where they are expected to already exist.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NOTDIR:CAPS"></a><code class="literal">G_FILE_ERROR_NOTDIR</code></span></p></td><td>A file that isn't a directory was specified when     a directory is required.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NXIO:CAPS"></a><code class="literal">G_FILE_ERROR_NXIO</code></span></p></td><td>No such device or address.  The system tried to     use the device represented by a file you specified, and it     couldn't find the device.  This can mean that the device file was     installed incorrectly, or that the physical device is missing or     not correctly attached to the computer.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NODEV:CAPS"></a><code class="literal">G_FILE_ERROR_NODEV</code></span></p></td><td>This file is of a type that doesn't support     mapping.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-ROFS:CAPS"></a><code class="literal">G_FILE_ERROR_ROFS</code></span></p></td><td>The directory containing the new link can't be          modified because it's on a read-only file system.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-TXTBSY:CAPS"></a><code class="literal">G_FILE_ERROR_TXTBSY</code></span></p></td><td>Text file busy.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-FAULT:CAPS"></a><code class="literal">G_FILE_ERROR_FAULT</code></span></p></td><td>You passed in a pointer to bad memory.  (GLib won't reliably return this, don't pass in pointers to bad  memory.)</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-LOOP:CAPS"></a><code class="literal">G_FILE_ERROR_LOOP</code></span></p></td><td>Too many levels of symbolic links were encountered  in looking up a file name.  This often indicates a cycle of symbolic  links.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NOSPC:CAPS"></a><code class="literal">G_FILE_ERROR_NOSPC</code></span></p></td><td>No space left on device; write operation on a  file failed because the disk is full.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NOMEM:CAPS"></a><code class="literal">G_FILE_ERROR_NOMEM</code></span></p></td><td>No memory available.  The system cannot allocate     more virtual memory because its capacity is full.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-MFILE:CAPS"></a><code class="literal">G_FILE_ERROR_MFILE</code></span></p></td><td>The current process has too many files open and     can't open any more.  Duplicate descriptors do count toward this     limit.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NFILE:CAPS"></a><code class="literal">G_FILE_ERROR_NFILE</code></span></p></td><td>There are too many distinct file openings in the     entire system.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-BADF:CAPS"></a><code class="literal">G_FILE_ERROR_BADF</code></span></p></td><td>Bad file descriptor; for example, I/O on a     descriptor that has been closed or reading from a descriptor open     only for writing (or vice versa).</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-INVAL:CAPS"></a><code class="literal">G_FILE_ERROR_INVAL</code></span></p></td><td>Invalid argument.  This is used to indicate     various kinds of problems with passing the wrong argument to a     library function.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-PIPE:CAPS"></a><code class="literal">G_FILE_ERROR_PIPE</code></span></p></td><td>Broken pipe; there is no process reading from the     other end of a pipe.  Every library function that returns this     error code also generates a `SIGPIPE' signal; this signal     terminates the program if not handled or blocked.  Thus, your     program will never actually see this code unless it has handled or     blocked `SIGPIPE'.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-AGAIN:CAPS"></a><code class="literal">G_FILE_ERROR_AGAIN</code></span></p></td><td>Resource temporarily unavailable; the call might     work if you try again later.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-INTR:CAPS"></a><code class="literal">G_FILE_ERROR_INTR</code></span></p></td><td>Interrupted function call; an asynchronous signal     occurred and prevented completion of the call.  When this     happens, you should try the call again.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-IO:CAPS"></a><code class="literal">G_FILE_ERROR_IO</code></span></p></td><td>Input/output error; usually used for physical read    or write errors. i.e. the disk or other physical device hardware    is returning errors.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-PERM:CAPS"></a><code class="literal">G_FILE_ERROR_PERM</code></span></p></td><td>Operation not permitted; only the owner of the     file (or other resource) or processes with special privileges can     perform the operation.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-NOSYS:CAPS"></a><code class="literal">G_FILE_ERROR_NOSYS</code></span></p></td><td>Function not implemented; this indicates that the    system is missing some functionality.</td></tr><tr><td><p><span class="term"><a name="G-FILE-ERROR-FAILED:CAPS"></a><code class="literal">G_FILE_ERROR_FAILED</code></span></p></td><td>Does not correspond to a UNIX error code; this  is the standard "failed for unspecified reason" error code present in   all <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error code enumerations. Returned if no specific  code applies.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3109454"></a><h3><a name="G-FILE-ERROR:CAPS"></a>G_FILE_ERROR</h3><a class="indexterm" name="id3109464"></a><pre class="programlisting">#define G_FILE_ERROR g_file_error_quark ()</pre><p>Error domain for file operations. Errors in this domain willbe from the <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for information on error domains.</p></div><hr><div class="refsect2" lang="en"><a name="id3109493"></a><h3><a name="GFileTest"></a>enum GFileTest</h3><a class="indexterm" name="id3109503"></a><pre class="programlisting">typedef enum{  G_FILE_TEST_IS_REGULAR    = 1 &lt;&lt; 0,  G_FILE_TEST_IS_SYMLINK    = 1 &lt;&lt; 1,  G_FILE_TEST_IS_DIR        = 1 &lt;&lt; 2,  G_FILE_TEST_IS_EXECUTABLE = 1 &lt;&lt; 3,  G_FILE_TEST_EXISTS        = 1 &lt;&lt; 4} GFileTest;</pre><p>A test to perform on a file using <a class="link" href="glib-File-Utilities.html#g-file-test"><code class="function">g_file_test()</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="G-FILE-TEST-IS-REGULAR:CAPS"></a><code class="literal">G_FILE_TEST_IS_REGULAR</code></span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a regular file (not a directory).    Note that this test will also return <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the tested file is a symlink    to a regular file.</td></tr><tr><td><p><span class="term"><a name="G-FILE-TEST-IS-SYMLINK:CAPS"></a><code class="literal">G_FILE_TEST_IS_SYMLINK</code></span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a symlink.</td></tr><tr><td><p><span class="term"><a name="G-FILE-TEST-IS-DIR:CAPS"></a><code class="literal">G_FILE_TEST_IS_DIR</code></span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a directory.</td></tr><tr><td><p><span class="term"><a name="G-FILE-TEST-IS-EXECUTABLE:CAPS"></a><code class="literal">G_FILE_TEST_IS_EXECUTABLE</code></span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is executable.</td></tr><tr><td><p><span class="term"><a name="G-FILE-TEST-EXISTS:CAPS"></a><code class="literal">G_FILE_TEST_EXISTS</code></span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file exists.     It may or may not be a regular file.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3109679"></a><h3><a name="g-file-error-from-errno"></a>g_file_error_from_errno ()</h3><a class="indexterm" name="id3109689"></a><pre class="programlisting"><a class="link" href="glib-File-Utilities.html#GFileError">GFileError</a>          g_file_error_from_errno             (<a class="link" href="glib-Basic-Types.html#gint">gint</a> err_no);</pre><p>Gets a <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> constant based on the passed-in <em class="parameter"><code>errno</code></em>.For example, if you pass in <code class="literal">EEXIST</code> this function returns<a class="link" href="glib-File-Utilities.html#G-FILE-ERROR-EXIST:CAPS"><span class="type">G_FILE_ERROR_EXIST</span></a>. Unlike <em class="parameter"><code>errno</code></em> values, you can portablyassume that all <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> values will exist.</p><p>Normally a <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> value goes into a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> returnedfrom a function that manipulates files. So you would use<a class="link" href="glib-File-Utilities.html#g-file-error-from-errno"><code class="function">g_file_error_from_errno()</code></a> when constructing a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</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>err_no</code></em>&#160;:</span></p></td>

⌨️ 快捷键说明

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