Command: MoveFile

NEST HelpDesk Command Index NEST Quick Reference

Name:
 MoveFile - Rename a file
Synopsis:
 string1 string2 MoveFile -> boolean
Description:
 Rename a file, e.g. link the file to the new name
     and unlink the old filename. If this unlink was the only link
     to the file, the old file is effectively deleted.
     Note that this is only guaranteed to work if new and old filename
     refer to the same directory. Renaming over different directories
     might work, but that's not POSIX and thus not portable.
Parameters:
 string1 : Old File
             string2 : NewFile
             boolean : A flag if operation succeded.
Examples:
 (Simulation1) (obsolete) MoveFile -> The File Simulation1
                                                is now called obsolete
Bugs:
 -
Author:
 Hehl
FirstVersion:
 Oct 12th 1999
Remarks:
 Since POSIX rename() did not work for some obscur reasons,
     MoveFile indeed works by linking the new filename and unlinking
     the old one!
     But that's exactly what rename() is supposed to do, no damage done...
SeeAlso:CopyFile ofstream ifstream DeleteFile FileNames MakeDirectory RemoveDirectory
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/filesystem.sli

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative