Next: Line/Delimited, Previous: Closing, Up: Input and Output
Sets the current position of fd/port to the integer offset, which is interpreted according to the value of whence.
One of the following variables should be supplied for whence:
If fd/port is a file descriptor, the underlying system call islseek
. port may be a string port.The value returned is the new position in the file. This means that the current position of a port can be obtained using:
(seek port 0 SEEK_CUR)
Return an integer representing the current position of fd/port, measured from the beginning. Equivalent to:
(seek port 0 SEEK_CUR)
Truncates the object referred to by object to at most length bytes. object can be a string containing a file name or an integer file descriptor or a port. length may be omitted if object is not a file name, in which case the truncation occurs at the current port position. The return value is unspecified.