Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>_fsrename()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _fsRename()
 Rename a file
------------------------------------------------------------------------------
 C Prototype

     #include "filesys.api"
     void _fsRename(
                     BYTEP fpOldName,
                     BYTEP fpNewName
                   )

 Arguments

     fpOldName is the current name of the file.

     fpNewName is the new name for the file.

 Returns

     _fsRename() has no return value.

 Description

     This function renames the file, fpOldName, to the new name, fpNewName.
     This function is equivalent to the CA-Clipper function FRENAME().  If an
     error occurs, _fsError() will return the number of the error.

 Examples

     .  The following code fragment illustrates the use of
        _fsRename().  Note that error handling is important when renaming a
        file as the function can fail for a number of reasons:

        #include "filesys.api"
        .
        .
        .
        _fsRename( "Foo", "Temp" );

        // Always check for errors when renaming a file
        if (_fsError() )
        {
           // Report the error condition
        }

 Files:  Library is CLIPPER.LIB, header file is Filesys.api.


See Also: _fsDelete() _fsError()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson