# Command: MoveFile

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    MoveFile - Rename a file

Synopsis:

    string1 string2 MoveFile -> boolean

Examples:

    (Simulation1) (obsolete) MoveFile -> The File Simulation1
      is now called obsolete

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.

Bugs:

    -

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...

Author:

    Hehl

FirstVersion:

    Oct 12th 1999

SeeAlso:

- CopyFile
- ofstream
- ifstream
- DeleteFile
- FileNames
- MakeDirectory
- RemoveDirectory

Source:

    /opt/conda/conda-bld/nest_1510212701067/work/nest-2.14.0/lib/sli/filesystem.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative