vfsRename

function

Library: File system utilities (OMVFS legacy)
Include: omvfs.xin

Declaration
define external function vfsRename
 value	stream location
 to value stream newname

Argument definitions

location
the file or directory target of the rename
newname
the new name of the target


Purpose

Use this function to rename a file or subdirectory.

Location must:

  • exist (external exception VFS306)
  • be either a file or directory
  • be expressed
    • relative to the current directory , or
    • as an absolute directory pathor path and filename
    Specifying location in any other format will cause an exception to be thrown (external exception VFS107).

Newname must

  • not already exist (external exception VFS307)
  • be a plain name (no path information) (external exception VFS110).

Example

Renaming a file on the current directory

 include "omvfs.xin"
 
 process
 	.
 	.
 	.
 vfsRename "myfile.txt"
 	to "myoldfile.txt"

Other Library Functions

AltStyle によって変換されたページ (->オリジナル) /