TStreamFileWriter() > Methods xHarbour Developers Network  

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
ConstantValueDescription
FS_SET *)0Start at the beginning of the file
FS_RELATIVE1Start at the current file pointer position
FS_END2Start 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