swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts  
operator  

file...exists

 

 

Return type: Boolean
Returns:       

Returns true if the named file exists and false otherwise.



Syntax
  file string-expression exists


Purpose

An operator that tests whether a named file exists. Useful for avoiding overwriting a file that already exists with a new one.

For example, the following shows how a file...exists test can be used to avoid overwriting an existing file:

  global stream error-strm
  ...
  do when file "errors.log" exists
    put #error "File errors.log already exists.%n"
    put #error "Please delete or rename it before running this program.%n"
    halt with 1
  else
    open error-strm as file "errors.log"
  done

      Related Concepts
   File tests
   Security considerations
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.