📄 fstatvfs.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>fstatvfs</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_005_311"> </a>NAME</h4><blockquote>fstatvfs, statvfs - get file system information</blockquote><h4><a name = "tag_000_005_312"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="sysstatvfs.h.html">sys/statvfs.h</a>>int fstatvfs(int <i>fildes</i>, struct statvfs *<i>buf</i>);int statvfs(const char *<i>path</i>, struct statvfs *<i>buf</i>);</code></pre></blockquote><h4><a name = "tag_000_005_313"> </a>DESCRIPTION</h4><blockquote>The<i>fstatvfs()</i>function obtains information about the file system containing the filereferenced by <i>fildes</i>.<p>The following flags can be returned in the <b>f_flag</b> member:<dl compact><dt>ST_RDONLY<dd>Read-only file system.<dt>ST_NOSUID<dd>Setuid/setgid bits ignored by exec.</dl><p>The<i><a href="statvfs.html">statvfs()</a></i>function obtains descriptive information about the file system containing thefile named by <i>path</i>.<p>For both functions, the <i>buf</i> argument is a pointer to a <b>statvfs</b>structure that will be filled. Read, write, or execute permission of thenamed file is not required, but all directories listed in the pathname leadingto the file must be searchable.<p>It is unspecified whether all members of the <b>statvfs</b>structure have meaningful values on all file systems.</blockquote><h4><a name = "tag_000_005_314"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i><a href="statvfs.html">statvfs()</a></i>returns 0. Otherwise, it returns -1 and sets <i>errno</i> to indicate theerror.</blockquote><h4><a name = "tag_000_005_315"> </a>ERRORS</h4><blockquote>The<i>fstatvfs()</i>and<i><a href="statvfs.html">statvfs()</a></i>functions will fail if:<dl compact><dt>[EIO]<dd>An I/O error occurred while reading the file system.<dt>[EINTR]<dd>A signal was caught during execution of the function.<dt>[EOVERFLOW]<dd>One of the values to be returned cannot be represented correctly inthe structure pointed to by <b>buf</b>.</dl><p>The<i>fstatvfs()</i>function will fail if:<dl compact><dt>[EBADF]<dd>The <i>fildes</i> argument is not an open file descriptor.</dl><p>The<i><a href="statvfs.html">statvfs()</a></i>function will fail if:<dl compact><dt>[EACCES]<dd>Search permission is denied on a component of the <i>path</i> prefix.<dt>[ELOOP]<dd>Too many symbolic links were encountered in resolving <i>path</i>.<dt>[ENAMETOOLONG]<dd>The length of a pathname exceeds {PATH_MAX}, or a pathnamecomponent is longer than {NAME_MAX}.<dt>[ENOENT]<dd>A component of <i>path</i> does not name an existing fileor <i>path</i> is an empty string.<dt>[ENOTDIR]<dd>A component of the path prefix of <i>path</i> is not a directory.</dl><br><p>The<i><a href="statvfs.html">statvfs()</a></i>function may fail if:<dl compact><dt>[ENAMETOOLONG]<dd>Pathname resolution of a symbolic link produced an intermediate result whoselength exceeds {PATH_MAX}.</dl></blockquote><h4><a name = "tag_000_005_316"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_005_317"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_005_318"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_005_319"> </a>SEE ALSO</h4><blockquote><i><a href="chmod.html">chmod()</a></i>,<i><a href="chown.html">chown()</a></i>,<i><a href="creat.html">creat()</a></i>,<i><a href="dup.html">dup()</a></i>,<i><a href="exec.html">exec</a></i>,<i><a href="fcntl.html">fcntl()</a></i>,<i><a href="link.html">link()</a></i>,<i><a href="mknod.html">mknod()</a></i>,<i><a href="open.html">open()</a></i>,<i><a href="pipe.html">pipe()</a></i>,<i><a href="read.html">read()</a></i>,<i><a href="time.html">time()</a></i>,<i><a href="unlink.html">unlink()</a></i>,<i><a href="utime.html">utime()</a></i>,<i><a href="write.html">write()</a></i>,<i><a href="sysstatvfs.h.html"><sys/statvfs.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -