|
|||||
|
||||||
Other Library Functions |
function |
vfsTruncate |
Library: File system utilities (OMVFS legacy)
Include: omvfs.xin |
define external function vfsTruncate value vfsFile file at value integer absolute optional
Argument definitions
Use vfsTruncate to truncate a file at a specified byte.
You must include the following line at the beginning of your OmniMark program:
include "omvfs.xin"
file must be:
absolute deletes file contents beginning with:
If absolute isn't supplied, then it defaults to the current cursor position.
If absolute is greater than the current file size, then the file size in increased to absolute and the new file contents are undefined.
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.
Truncate a file from byte 200 to the end of the file.
include "omvfs.xin" process local vfsFile vfsFile2 set vfsFile2 to vfsOpen "myfile.txt" for VFS-READ-WRITE vfsTruncate vfsFile2 at 200
Copyright © Stilo International plc, 1988-2010.