|
|||||
|
||||||
Other Library Functions |
function |
vfsWrite |
Library: File system utilities (OMVFS) legacy
Include: omvfs.xin |
Return type: String sink Returns: An OmniMark output object to the opened file. |
define external string sink function vfsWrite value vfsFile file
Argument definitions
Use vfsWrite to obtain an output object (to write) to an open file.
You must include the following line at the beginning of your OmniMark program:
include "omvfs.xin"
file must
The locking exception can be thrown at any point during writing (external exception VFS217).
External exception VFS300 is thrown for any general OS operation failure. The text accompanying the exception will contain details on the reason for the failure.
This example shows appropriate steps to write to the file Notes.txt in the private directory.
include "omvfs.xin" process local vfsFile myFile local stream foo . . . set myFile to vfsOpen "/private/Notes.txt" for VFS-READ-WRITE . . . vfsLock myFile open foo as vfsWrite myFile put foo "Write this to the specified file. %n" vfsUnlock myFile
Copyright © Stilo International plc, 1988-2008.