swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     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 output 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 Syntax
   FS_GetCurrentDirectory
 
  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
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:14 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.