|
||||||||||
|
|
||||||||||
| Related Syntax | Related Concepts | Other Library Functions | ||||||||
| function | FS_ChangeDirectory |
Available in:
Professional Enterprise |
|
Library: omfsys - file system utilities
Include: omfsys.xin |
define external function FS_ChangeDirectory
value stream newpath
status modifiable stream statusvalue
where
The omfsys library has been deprecated and will be removed from a future version of the language. Use omvfs instead.
Use FS_ChangeDirectory to set the current (working) directory.
You must include the following line at the beginning of your OmniMark program:
include "omfsys.xin"
Note that "newpath" must refer to a valid path name, and you must have execute (search) access to the specified directory.
The statusvalue output argument will contain either a zero length string if the function succeeds, or one of the following error codes:
This example sets the working directory to "C:\temp"" and outputs an error message if any error occurs.
; FS_ChangeDirectory
include "omfsys.xin"
process
local stream error
local stream location initial {"C:\temp"}
FS_ChangeDirectory location status error
output "Error " || error || " changing to directory "
|| location || "%n" unless error = ""
|
Related Syntax FS_GetCurrentDirectory |
Related Concepts Security considerations |
Other Library Functions FS_ChangeDirectory FS_ChangeOwner FS_ChangePermissions FS_DeleteDirectory FS_DeleteFile FS_GetCurrentDirectory FS_IsVersionCompatible FS_LibraryVersion FS_Link FS_ListDirectory FS_MakeDirectory FS_Rename |
| ---- |