![]() |
|
||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
||||||
| Related Syntax | Other Library Functions | |||||
| function |
vfs.move-cursor |
|
Library: General, File system utilities (OMVFS)
Import: omvfs.xmd |
export external function move-cursor
of value file file-ref
by value integer offset optional
to value integer absolute optional
Argument definitions
You can use vfs.move-cursor to change the position at which the next read of a file will occur. The position may be specified either relative to the current cursor position, or as an absolute position in a file. For instance, if you know that the data you are interested in starts at byte 100 in a file, you can read from that position like this:
import "omvfs.xmd" prefixed by vfs.
process
local vfs.file test-file
set test-file
to vfs.open "c:/omnimark/projects/testfile.txt"
vfs.move-cursor of test-file to 100
output vfs.reader of test-file
You must specify either a relative or absolute movement, and not both.
The following exceptions may occur: