Section 11: TSP command reference Series 3700A System Switch/Multimeter Reference Manual
11-244 3700AS-901-01 Rev. D/June 2018
fileVar:seek()
This function sets and gets the present position of a file.
Usage
position, errorMsg = fileVar:seek()
position, errorMsg = fileVar:seek(whence)
position, errorMsg = fileVar:seek(whence, offset)
The new file position, measured in bytes from the beginning of the file
A string containing the error message
The file descriptor variable
A string indicating the base against which offset is applied; the default is
"cur"
The intended new position, measured in bytes from a base indicated by
whence (default is 0)
Details
The whence parameters may be any of the following:
"set": Beginning of file
"cur": Current position
"end": End of file
If an error is encountered, it is logged to the error queue, and the command returns nil and the error
string.
Also see
File I/O (on page 9-27)
io.open() (on page 11-255)