swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

vfs.reader

 
 

Library: General, File system utilities (OMVFS)
Import: omvfs.xmd
Return type: Source
Returns: 

An OmniMark source object to the opened file


Declaration

  export external source function reader
          of      value file file-ref

Argument definitions

file-ref
The vfs.file object associated with the file to be read from.


Purpose

You can use vfs.reader to read the contents of a file opened with vfs.open. vfs.reader returns an OmniMark source attached to the specified file.

  import "omvfs.xmd" prefixed by vfs.

  process
    local vfs.file test-file
     set test-file to vfs.open "/programs/test.txt"
      for vfs.read-mode
    submit vfs.reader of test-file

You can also read a file using OmniMark's built in file keyword, but using vfs.file gives you greater control over how the file is opened and read.

Exceptions

The following exceptions may occur:

    Related Syntax
   vfs.open
   vfs.writer
   vfs.lock
   vfs.unlock
   vfs.file
 
  Other Library Functions
   vfs.change-directory
   vfs.change-owner
   vfs.change-permissions
   vfs.close
   vfs.connect
   vfs.connect-directory
   vfs.copy
   vfs.cursor-position
   vfs.default-certificates-file
   vfs.delete-directory
   vfs.delete-file
   vfs.describe
   vfs.describe-file
   vfs.directory
   vfs.directory-name
   vfs.disconnect
   vfs.file
   vfs.file-directory
   vfs.file-name
   vfs.link
   vfs.list
   vfs.lock
   vfs.make-directory
   vfs.move
   vfs.move-cursor
   vfs.omvfs-version
   vfs.open
   vfs.open-file-system
   vfs.open-ftp
   vfs.open-http
   vfs.open-https
   vfs.reader
   vfs.set-default-certificates-file
   vfs.truncate
   vfs.unlock
   vfs.writer
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.