|  | 
 | ||||
|        | |||||
|  | ||||||
| Other Library Functions | ||||||
| function | vfsMoveCursor | 
| Library: File system utilities (OMVFS) legacy Include: omvfs.xin | 
define external function vfsMoveCursor 
       value  vfsFile  file
   by  value  integer  offset
     
or
define external function vfsMoveCursor 
       value  vfsFile  file
   to  value  integer  absolute
Argument definitions
Use vfsMoveCursor to change the cursor position from the current location in a file's contents to the position you specify.
You must include the following line at the beginning of your OmniMark program: 
include "omvfs.xin"
file must:
offset
absolute
If neither absolute or offset is specified, external exception VFS210 is thrown.
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.
Move the cursor to the 200th position in the text, then move the cursor to the 210th position in the text, and finally output the text from position 210 to the end. The cursor finishes at the end of the file.
  include "omvfs.xin"
  
  process
     local vfsFile Cairo
     	. . .
     set Cairo to vfsOpen "cairo-doc.txt" for VFS-READ
     	. . .
     vfsMoveCursor Cairo to 200
     vfsMoveCursor Cairo by 10
     output "Contents after position 210:  " || vfsRead Cairo || "%n"
Copyright © Stilo International plc, 1988-2008.