TStreamFileWriter() > Methods |
 |
|
oTStreamFileWriter:seek()
Changes the position of the file pointer.
Syntax
:seek( <nBytes>, <nOrigin> ) --> nPosition
Arguments
- <nBytes>
- This is a numeric value specifying the number of bytes to move the file
pointer. It can be a positive or negative number. Negative numbers move
the file pointer backwards (towards the beginning of the file), positive
values move it forwards. The value zero is used to position the
file pointer exactly at the location specified with <nOrigin>.
- <nOrigin>
- Optionally, the starting position from where to move the file pointer can
be specified. #define constants are available in the FILEIO.CH file that
can be used for <nOrigin>.
Start positions for moving the file pointer
Constant | Value | Description |
FS_SET *) | 0 | Start at the beginning of the file |
FS_RELATIVE | 1 | Start at the current file pointer position |
FS_END | 2 | Start at the end of the file |
Description
Method :seek() is used to change the current position of the low-level file pointer. It returns
the new position of the file pointer as a numeric value. Refer to function FSeek() for
more information.
Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe