Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

fileSeek(fid, pos)

Package

file

Alias

Pkg Usage

seek(fid, pos)

Description

Excerpt
hiddentrue
Moves the file pointer to a specific spot in an already open file.

...

If the position is negative, moves the file pointer at the end of the file. If the position is 0 (zero) it moves the pointer at the beginning of the file.

Moves the file pointer to a specific spot in an already open file.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

fid

String

Yes

The id of the open file to read from.

pos

Integer

Yes

The new position of the cursor.

Return Type

integerInteger

Returns the current position of the file pointer.

Error Handling

Throws String

string

...

Example

Example 1

Code Block
languagejs
use "file";

int fid = open("C:\alphabet.txt");
seek(fid, 10);
runnerLog(fileReadLine(fid));
close(fid);

Returns: KLMNOPQRSTUVWXYZ

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "file_

...

routine" and space = currentSpace ( )
labelsarray_routines