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

file...is readable

 

 

Return type: Boolean
Returns:       

Returns true if the file is readable, false otherwise. Using isnt instead of is will reverse the results.



Syntax
  file string-expression (is | isnt) readable


Purpose

This operator returns true if the file named by the string expression is readable by the OmniMark program. This can be done before executing an action that requires a readable file. If the file does not exist, it is (obviously) not readable.

If the file does not exist or is not readable, the programmer can choose an alternative path.

For example, the following code tests whether or not a file exists or is readable and, if not, it notes the error:

  find "\input{" [ \  "}"]+ => filename "}"
    do when file filename is readable
      submit file filename
    else
      put #error "File %g(filename) doesn't exist.%n"
      put #error "Processing continues... %n"
    done  

      Related Concepts
   File tests
 
 

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.