updating oE rename_file
rename_file
include filesys.e namespace filesys public function rename_file(sequence old_name, sequence new_name, integer overwrite = 0)
rename a file.
Parameters:
- old_name : a sequence, the name of the file or directory to rename.
- new_name : a sequence, the new name for the renamed file
- overwrite : an integer, 0 (the default) to prevent renaming if destination file exists, 1 to delete existing destination file first
Returns:
An integer, 0 on failure, 1 on success.
Comments:
- If new_name contains a path specification, this is equivalent to moving the file, as well as possibly changing its name. However, the path must be on the same drive for this to work.
- If overwrite was requested but the rename fails, any existing destination file is preserved.
See Also:
Not Categorized, Please Help
|