swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

FS_ChangeDirectory

 
 

Library: File system utilities (OMFSYS legacy)
Include: omfsys.xin

Declaration

define external function FS_ChangeDirectory
                value      stream  newpath
   status       modifiable stream  statusvalue

Argument definitions

newpath
is the absolute or relative path name of the new directory (input argument)
statusvalue
is an argument containing either a zero length string if the function succeeds, or one of the error codes listed in the Usage Notes section.


Purpose

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.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omfsys.xin"

Usage Notes

Note that "newpath" must refer to a valid path name, and you must have execute (search) access to the specified directory.

The statusvalue string sink argument will contain either a zero length string if the function succeeds, or one of the following error codes:

Example

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 Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.