TUfileSeek TCL UTILITIES USER MANUAL TUfileSeek
SYNOPSIS
Go to a byte position in a file
PACKAGE
TCLUTILS
NAME
TUfileSeek
USAGE
set rV  [TUfileSeek  fD Offset Origin
INPUT DEFINITIONS
fD - File descriptor of file to seek into.
Offset - The number of bytes to move into the file. Negative bytes are ok and move the current file pointer location towards the beginning of the file. The starting position of the move depends on the next input parameter.
Origin - The location from which to perform the byte offset. Valid locations are:
start - The beginning of the file.
current - The current position of the file pointer.
end - The end of the file.
RETURN DEFINITION
rV - Returns -1 if the seek will position the file pointer before the beginning of the file or after the end; otherwise it returns the byte position of the file pointer in the file.
DESCRIPTION
TUfileSeek changes the byte position of a file pointer in a file. The file pointer can be advanced or moved backwards in a file by specifying the Offset number of bytes to be positive or negative respectively. The Offset can be applied either from the beginning or end of the file or from the current file pointer position. The procedure returns -1 if the offset will move the file pointer outside of the file, otherwise it returns the byte position of the file pointer in the file.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
None Given
      
Sept 19, 2006