Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | fileSeek(fid, pos) | Package | file | Alias | | Pkg Usage | seek(fid, pos) |
|
Description
Excerpt |
---|
|
Moves the cursor file pointer to a specific spot in an already open file. |
Moves the cursor 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.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
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 cursorfile pointer.
Throws
string
"seek_error:"
followed by the actual error
Example
Example 1
Code Block |
---|
use "file";
int fid = fileOpenopen("C:\alphabet.txt");
fileSeekseek(fid, 10);
runnerLog(fileReadLine(fid));
close(fid); |
Returns: KLMNOPQRSTUVWXYZ
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "file_ |
---|
|
...
routines" and space = currentSpace ( ) | labels | array_routines |
---|
|