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

vfsUnlock

 
 

Library: File system utilities (OMVFS legacy)
Include: omvfs.xin

Declaration

define external function vfsUnlock
         value  vfsFile  file
     id  value  integer  lock-id  optional

Argument definitions

file
is the vfsFile object associated with the file to be unlocked.
lock-id
is the identifier of a single locked section.


Purpose

Use vfsUnlock to unlock a file. A single locked section or the entire file may be unlocked.

Requirements

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

  include "omvfs.xin"

file must be open (else external exception VFS200).

lock-id must be the ID of an existing lock on the specified file (else external exception VFS218).

Usage Notes

If lockid is

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: Removing a specific lock from a file

This program shows a lock being set and then removed.

    include "omvfs.xin"
  
    process
       local vfsFile myFile2
       local integer myLock
       	. . .
       set myFile2 to vfsOpen "myfile.txt"
       	. . .
       vfsLock myFile2
       	from VFS-START to 800
    	id myLock
       	. . .
       vfsUnlock myFile2
    	id myLock

      Other Library Functions
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.