Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SixFile Functions (continued)

SetFilePosition Function

Overview

The SetFilePosition function moves the current position to the start of a Basic File Object or an optionally specified position.

Syntax/Parameters

Syntax

int = SetFilePosition ( handle hBasicFile, [qword position ] );

Parameters

hBasicFile

A handle to a Basic File Object.

position

An optional qword containing a position from which the next read or write will apply. If omitted, the value will be zero.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure. Use the GetLastError function to retrieve error information.

Remarks

The SetFilePosition function does not return an error if the position parameter sets the file pointer beyond the end of the file. This enlarges the file, however, the size of the file does not increase until the TruncateFilePosition, WriteBlock or WriteLine functions are called. A write operation increases the size of the file to the position specified plus the size of the buffer written, which results in the intervening bytes being uninitialized.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic