move. Moving or renaming a file

^file:move[old_filename;new_filename]
^file:move[old_filename;new_filename;options]
   [3.4.3]

The method renames/moves file or directory (under Win32, objects cannot be moved to another disk). New directories are created with file permissions
755. The directory of the old file is deleted if it is found empty after the file is moved.

Optional
options:
$.keep-empty-dirs(true)-preserve empty directories after the file is moved.

Note: you should be very careful with everything that involves writing within web-space, as this feature (writing something to somewhere) is now widely used by malicious users.

Example

^file:move[/path/file1;/file1]

Will move file1 into root directory.


Copyright © 1997–2017 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 23.10.2013