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

vfs.reader

 
 

Library: File system utilities (OMVFS)
Import: omvfs.xmd
Return type: String source

Returns: An OmniMark source object to the opened file


Declaration

export external string 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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.