📄 usrfslib.html
字号:
<p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cp( )</strong> - copy file into other file/directory.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS cp ( const char * src, /* source file or wildcard pattern */ const char * dest /* destination file name or directory */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command copies from the input file to the output file.If destination name is directory, a source file is copied intothis directory, using the last element of the source file nameto be the name of the destination file.<p>This function is very similar to <b><a href="./usrFsLib.html#copy">copy</a>( )</b>, except it is somewhatmore similar to the UNIX "cp" program in its handling of thedestination.<p><i>src</i> may contain a wildcard pattern, in which case all filesmatching the pattern will be copied to the directory specified in<i>dest</i>.This function does not copy directories, and is not recursive.To copy entire subdirectories recursively, use <b><a href="./usrFsLib.html#xcopy">xcopy</a>( )</b>.<p></blockquote><h4>EXAMPLES</h4><blockquote><p><pre>-> cp( "/sd0/FILE1.DAT","/sd0/dir2/f001.dat")-> cp( "/sd0/dir1/file88","/sd0/dir2")-> cp( "/sd0/*.tmp","/sd0/junkdir")</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if destination is not a directory while <i>src</i> isa wildcard pattern, or if any of the files could not be copied.<p>SEE ALSO; <b><a href="./usrFsLib.html#xcopy">xcopy</a>( )</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b><hr><a name="mv"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>mv( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>mv( )</strong> - mv file into other directory.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS mv ( const char * src, /* source file name or wildcard */ const char * dest /* destination name or directory */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is similar to <b><a href="./ioLib.html#rename">rename</a>( )</b> but behaves somewhat morelike the UNIX program "mv", it will overwrite files.<p>This command moves the <i>src</i> file or directory intoa file which name is passed in the <i>dest</i> argument, if <i>dest</i> isa regular file or does not exist.If <i>dest</i> name is a directory, the source object is moved intothis directory as with the same name,if <i>dest</i> is NULL, the current directory is assumed as the destinationdirectory.<i>src</i> may be a single file name or a path containing a wildcardpattern, in which case all files or directories matching the patternwill be moved to <i>dest</i> which must be a directory in this case.<p></blockquote><h4>EXAMPLES</h4><blockquote><p><pre>-> mv( "/sd0/dir1","/sd0/dir2")-> mv( "/sd0/*.tmp","/sd0/junkdir")-> mv( "/sd0/FILE1.DAT","/sd0/dir2/f001.dat")</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK or error if any of the files or directories could not bemoved, or if <i>src</i> is a pattern but the destination is not adirectory.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b><hr><a name="xcopy"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>xcopy( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>xcopy( )</strong> - copy a hierarchy of files with wildcards</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS xcopy ( const char * source, /* source directory or wildcard name */ const char * dest /* destination directory */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><i>source</i> is a string containing a name of a directory, or a wildcardor both which will cause this function to make a recursive copy of allfiles residing in that directory and matching the wildcard pattern intothe <i>dest</i> directory, preserving the file names and subdirectories.<p></blockquote><h4>CAVEAT</h4><blockquote><p>This function may call itself in accordance with the depth of thesource directory, and occupies approximately 800 bytes per stackframe, meaning that to accommodate the maximum depth of subdirectorieswhich is 20, at least 16 Kbytes of stack space should be available toavoid stack overflow.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if any operation has failed.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <b><a href="./tarLib.html#top">tarLib</a></b>, <b><a href="./usrLib.html#checkStack">checkStack</a>( )</b>, <b><a href="./usrFsLib.html#cp">cp</a>( )</b><hr><a name="xdelete"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>xdelete( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>xdelete( )</strong> - delete a hierarchy of files with wildcards</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS xdelete ( const char * source /* source directory or wildcard name */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><i>source</i> is a string containing a name of a directory, or a wildcardor both which will cause this function to recursively remove allfiles and subdirectories residing in that directoryand matching the wildcard pattern.When a directory is encountered, all its contents are removed,and then the directory itself is deleted.<p></blockquote><h4>CAVEAT</h4><blockquote><p>This function may call itself in accordance with the depth of thesource directory, and occupies approximately 520 bytes per stackframe, meaning that to accommodate the maximum depth of subdirectorieswhich is 20, at least 10 Kbytes of stack space should be available toavoid stack overflow.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if any operation has failed.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <b><a href="./usrLib.html#checkStack">checkStack</a>( )</b>, <b><a href="./usrFsLib.html#cp">cp</a>( )</b>, <b><a href="./usrFsLib.html#copy">copy</a>( )</b>, <b><a href="./usrFsLib.html#xcopy">xcopy</a>( )</b>, <b><a href="./tarLib.html#top">tarLib</a></b><hr><a name="attrib"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>attrib( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>attrib( )</strong> - modify MS-DOS file attributes on a file or directory</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS attrib ( const char * fileName, /* file or dir name on which to change flags */ const char * attr /* flag settings to change */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function provides means for the user to modify the attributesof a single file or directory. There are four attribute flags whichmay be modified: "Archive", "System", "Hidden" and "Read-only".Among these flags, only "Read-only" has a meaning in VxWorks,namely, read-only files can not be modified deleted or renamed.<p>The <i>attr</i> argument string may contain must start with either "+" or"-", meaning the attribute flags which will follow should be either setor cleared. After "+" or "-" any of these four letter will signify theirrespective attribute flags - "A", "S", "H" and "R".<p>For example, to write-protect a particular file and flag that it is asystem file:<p><pre>-> attrib( "bootrom.sys", "+RS")</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the file can not be opened.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b><hr><a name="xattrib"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>xattrib( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>xattrib( )</strong> - modify MS-DOS file attributes of many files</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS xattrib ( const char * source, /* file or directory name on which to */ /* change flags */ const char * attr /* flag settings to change */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is essentially the same as <b><a href="./usrFsLib.html#attrib">attrib</a>( )</b>, but it acceptswildcards in <i>fileName</i>, and traverses subdirectories in orderto modify attributes of entire file hierarchies.<p>The <i>attr</i> argument string may contain must start with either "+" or"-", meaning the attribute flags which will follow should be either setor cleared. After "+" or "-" any of these four letter will signify theirrespective attribute flags - "A", "S", "H" and "R".<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>-> xattrib( "/sd0/sysfiles", "+RS") /* write protect "sysfiles" */-> xattrib( "/sd0/logfiles", "-R") /* unprotect logfiles before deletion */-> xdelete( "/sd0/logfiles")</pre></blockquote><h4>CAVEAT</h4><blockquote><p>This function may call itself in accordance with the depth of thesource directory, and occupies approximately 520 bytes per stackframe, meaning that to accommodate the maximum depth of subdirectorieswhich is 20, at least 10 Kbytes of stack space should be available toavoid stack overflow.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the file can not be opened.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b><hr><a name="diskFormat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>diskFormat( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>diskFormat( )</strong> - format a disk</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS diskFormat ( const char * pDevName /* name of the device to initialize */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command formats a disk and creates a file system on it. Thedevice must already have been created by the device driver andinitialized for use with a particular file system, via <b>dosFsDevInit( )</b>.<p>This command calls <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> to perform the FIODISKFORMAT function.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> diskFormat "/fd0/"</pre></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the device cannot be opened or formatted.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <b><a href="./dosFsLib.html#top">dosFsLib</a></b><i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="diskInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>diskInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>diskInit( )</strong> - initialize a file system on a block device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS diskInit ( const char * pDevName /* name of the device to initialize */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is now obsolete, use of <b><a href="./dosFsFmtLib.html#dosFsVolFormat">dosFsVolFormat</a>( )</b> is recommended.<p>This command creates a new, blank file system on a block device. Thedevice must already have been created by the device driver andinitialized for use with a particular file system, via <b><a href="./dosFsLib.html#dosFsDevCreate">dosFsDevCreate</a>( )</b>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> diskInit "/fd0/"</pre>Note that if the disk is unformatted, it can not be mounted,thus <b><a href="./ioLib.html#open">open</a>( )</b> will return error, in which case use the dosFsVolFormatroutine manually.<p>This routine performs the FIODISKINIT ioctl operation.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, orERROR if the device cannot be opened or initialized.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <b><a href="./dosFsLib.html#top">dosFsLib</a></b><i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="ioHelp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ioHelp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ioHelp( )</strong> - print a synopsis of I/O utility functions</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void ioHelp (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function prints out synopsis for the I/O and File Systemutility functions.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -