Utilities.FileSeek Method

Applies to TestComplete 15.70, last modified on December 17, 2024
This method is obsolete. See the Remarks section below.

Description

The Utilities.FileSeek method sets the file pointer position within a file by the Offset bytes relative to the Origin position.

Declaration

Utilities.FileSeek(Handle, Offset, Origin)

Handle [in]    Required    Integer    
Offset [in]    Required    Integer    
Origin [in]    Required    Integer    
Result Integer

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

Handle

Specifies the handle of the desired file.

Offset

Specifies the file pointer position (in bytes) relative to the Origin position. If Offset is positive, FileSeek forwards the file pointer position to the specified number of bytes. If Offset is negative, the function moves the pointer by Offset bytes backward.

Origin

Specifies relative to which position the file pointer position will be set. Origin can be any of the following values:

Value Description
0 The function positions the file pointer relative to the beginning of the file.
1 The function positions the file pointer relative to the pointer's current position.
2 The function positions the pointer relative to the end of the file.

Result Value

If the file pointer has been positioned successfully, the function returns the new pointer position. Otherwise, the function returns -1.

Remarks

This method is obsolete. It is supported for backward compatibility only. To specify the file cursor position, use the aqBinaryFile.Cursor, aqTextFile.Cursor or aqTextFile.SetPosition method.

See Also

Cursor Property
Cursor Property
SetPosition Method
Create Method
OpenBinaryFile Method
OpenTextFile Method
aqBinaryFile Object Methods
Write Method

Highlight search results