export external string source function reader
of value file file-ref
- The vfs.file object associated with the file to be read from.
You can use
vfs.reader to read the contents of a file opened with
vfs.reader returns an OmniMark source attached to the specified file.
import "omvfs.xmd" prefixed by vfs.
local vfs.file test-file
set test-file to vfs.open "/programs/test.txt"
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.
The following exceptions may occur:
- VFS200 The vfsFile object must be opened before it can be used
- VFS204 The file 'X' must not have an active output or source associated with it
- VFS207 The file 'X' must be opened with read access to enable reading from it
- VFS217 The function timed out before the lock could be obtained on 'X'
- VFS300 Generic operating system error