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

vfsWrite

 
 

Library: File system utilities (OMVFS) legacy
Include: omvfs.xin
Return type: output
Returns: 

An OmniMark output object to the opened file.


Declaration

  define external output function vfsWrite
       value  vfsFile  file

Argument definitions

file
is the vfsFile object associated with the file to be modified.


Purpose

Use vfsWrite to obtain an output object (to write) to an open file.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omvfs.xin"

file must

Usage Notes

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.

Example

This example shows appropriate steps to write to the file Notes.txt in the private directory.

  1. Open a file with read-write access.
  2. Lock the file to avoid an exception if the file is locked by another process.
  3. Obtain an output object for the file.
  4. Write to the file.
  5. Unlock the file.

  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

        Other Library Functions
   vfsChangeDir
   vfsChangeOwner
   vfsChangePermissions
   vfsClose
   vfsConnect
   vfsConnectDir
   vfsCopy
   vfsCursorPosition
   vfsDeleteDir
   vfsDeleteFile
   vfsDescribe
   vfsDescribeFile
   vfsDir
   vfsDirName
   vfsDisconnect
   vfsFile
   vfsFileDir
   vfsFileName
   vfsIsVersionCompatible
   vfsLibraryVersion
   vfsLink
   vfsList
   vfsLock
   vfsMakeDir
   vfsMove
   vfsMoveCursor
   vfsOpen
   vfsRead
   vfsRename
   vfsTruncate
   vfsUnlock
   vfsWrite
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.