📄 dirlib.html
字号:
</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine resets the position pointer in a directory descriptor (DIR).The <i>pDir</i> parameter is the directory descriptor pointer that was returnedby <b><a href="./dirLib.html#opendir">opendir</a>( )</b>.<p>As a result, the next <b><a href="./dirLib.html#readdir">readdir</a>( )</b> will cause the current directory data to beread in again, as if an <b><a href="./dirLib.html#opendir">opendir</a>( )</b> had just been performed. Any changesin the directory that have occurred since the initial <b><a href="./dirLib.html#opendir">opendir</a>( )</b> will nowbe visible. The first entry in the directory will be returned by thenext <b><a href="./dirLib.html#readdir">readdir</a>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#opendir">opendir</a>( )</b>, <b><a href="./dirLib.html#readdir">readdir</a>( )</b>, <b><a href="./dirLib.html#closedir">closedir</a>( )</b><hr><a name="closedir"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>closedir( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>closedir( )</strong> - close a directory (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS closedir ( DIR * pDir /* pointer to directory descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine closes a directory which was previously opened using<b><a href="./dirLib.html#opendir">opendir</a>( )</b>. The <i>pDir</i> parameter is the directory descriptor pointerthat was returned by <b><a href="./dirLib.html#opendir">opendir</a>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#opendir">opendir</a>( )</b>, <b><a href="./dirLib.html#readdir">readdir</a>( )</b>, <b><a href="./dirLib.html#rewinddir">rewinddir</a>( )</b><hr><a name="fstat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>fstat( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fstat( )</strong> - get file status information (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fstat ( int fd, /* file descriptor for file to check */ struct stat * pStat /* pointer to stat structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains various characteristics of a file (or directory).The file must already have been opened using <b><a href="./ioLib.html#open">open</a>( )</b> or <b><a href="./ioLib.html#creat">creat</a>( )</b>.The <i>fd</i> parameter is the file descriptor returned by <b><a href="./ioLib.html#open">open</a>( )</b> or <b><a href="./ioLib.html#creat">creat</a>( )</b>.<p>The <i>pStat</i> parameter is a pointer to a <b>stat</b> structure (definedin <b>stat.h</b>). This structure must be allocated before <b><a href="./dirLib.html#fstat">fstat</a>( )</b> is called.<p>Upon return, the fields in the <b>stat</b> structure are updated toreflect the characteristics of the file.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#stat">stat</a>( )</b>, <b><a href="./usrFsLib.html#ls">ls</a>( )</b><hr><a name="stat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>stat( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>stat( )</strong> - get file status information using a pathname (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS stat ( char * name, /* name of file to check */ struct stat * pStat /* pointer to stat structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains various characteristics of a file (or directory).This routine is equivalent to <b><a href="./dirLib.html#fstat">fstat</a>( )</b>, except that the <i>name</i> of the fileis specified, rather than an open file descriptor.<p>The <i>pStat</i> parameter is a pointer to a <b>stat</b> structure (definedin <b>stat.h</b>). This structure must have already been allocated beforethis routine is called.<p></blockquote><h4>NOTE</h4><blockquote><p>When used with <b><a href="./netDrv.html#top">netDrv</a></b> devices (FTP or RSH), <b><a href="./dirLib.html#stat">stat</a>( )</b> returns the sizeof the file and always sets the mode to regular; <b><a href="./dirLib.html#stat">stat</a>( )</b> does not distinguishbetween files, directories, links, etc.<p>Upon return, the fields in the <b>stat</b> structure are updated toreflect the characteristics of the file.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#fstat">fstat</a>( )</b>, <b><a href="./usrFsLib.html#ls">ls</a>( )</b><hr><a name="fstatfs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>fstatfs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fstatfs( )</strong> - get file status information (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fstatfs ( int fd, /* file descriptor for file to check */ struct statfs * pStat /* pointer to statfs structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains various characteristics of a file system.A file in the file system must already have been opened using <b><a href="./ioLib.html#open">open</a>( )</b> or <b><a href="./ioLib.html#creat">creat</a>( )</b>.The <i>fd</i> parameter is the file descriptor returned by <b><a href="./ioLib.html#open">open</a>( )</b> or <b><a href="./ioLib.html#creat">creat</a>( )</b>.<p>The <i>pStat</i> parameter is a pointer to a <b>statfs</b> structure (definedin <b>stat.h</b>). This structure must be allocated before <b><a href="./dirLib.html#fstat">fstat</a>( )</b> is called.<p>Upon return, the fields in the <b>statfs</b> structure are updated toreflect the characteristics of the file.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#statfs">statfs</a>( )</b>, <b><a href="./usrFsLib.html#ls">ls</a>( )</b><hr><a name="statfs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>statfs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>statfs( )</strong> - get file status information using a pathname (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS statfs ( char * name, /* name of file to check */ struct statfs * pStat /* pointer to statfs structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains various characteristics of a file system.This routine is equivalent to <b><a href="./dirLib.html#fstatfs">fstatfs</a>( )</b>, except that the <i>name</i> of the fileis specified, rather than an open file descriptor.<p>The <i>pStat</i> parameter is a pointer to a <b>statfs</b> structure (definedin <b>stat.h</b>). This structure must have already been allocated beforethis routine is called.<p>Upon return, the fields in the <b>statfs</b> structure are updated toreflect the characteristics of the file.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#fstatfs">fstatfs</a>( )</b>, <b><a href="./usrFsLib.html#ls">ls</a>( )</b><hr><a name="utime"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>utime( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>utime( )</strong> - update time on a file</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int utime ( char * file, struct utimbuf * newTimes )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./dirLib.html#stat">stat</a>( )</b>, <b><a href="./dirLib.html#fstat">fstat</a>( )</b>, <b><a href="./usrFsLib.html#ls">ls</a>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -