seek (n)
Change the access position for an open channel
SYNOPSIS
seek channelId offset ?origin?
DESCRIPTION
Changes the current access position for channelId.
ChannelId must be a channel identifier such as returned from a
previous invocation of open or socket.
The offset and origin
arguments specify the position at which the next read or write will occur
for channelId. Offset must be an integer (which may be
negative) and origin must be one of the following:
start
The new access position will be offset bytes from the start
of the underlying file or device.
current
The new access position will be offset bytes from the current
access position; a negative offset moves the access position
backwards in the underlying file or device.
end
The new access position will be offset bytes from the end of
the file or device. A negative offset places the access position
before the end of file, and a positive offset places the access
position after the end of file.
The origin argument defaults to start.
The command flushes all buffered output for the channel before the command
returns, even if the channel is in nonblocking mode.
It also discards any buffered and unread input.
This command returns an empty string.
An error occurs if this command is applied to channels whose underlying
file or device does not support seeking.
KEYWORDS
access position, file, seek
'\"
'\" Copyright (c) 1996, Expert Interface Technologies
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" The definitions below are for supplemental macros used in Tix
'\" manual entries.
'\"
'\" .HS name section [date [version]]
'\" Replacement for .TH in other man pages. See below for valid
'\" section names.
'\"
'\" .AP type name in/out [indent]
'\" Start paragraph describing an argument to a library procedure.
'\" type is type of argument (int, etc.), in/out is either "in", "out",
'\" or "in/out" to describe whether procedure reads or modifies arg,
'\" and indent is equivalent to second arg of .IP (shouldn't ever be
'\" needed; use .AS below instead)
'\"
'\" .AS [type [name]]
'\" Give maximum sizes of arguments for setting tab stops. Type and
'\" name are examples of largest possible arguments that will be passed
'\" to .AP later. If args are omitted, default tab stops are used.
'\"
'\" .BS
'\" Start box enclosure. From here until next .BE, everything will be
'\" enclosed in one large box.
'\"
'\" .BE
'\" End of box enclosure.
'\"
'\" .VS
'\" Begin vertical sidebar, for use in marking newly-changed parts
'\" of man pages.
'\"
'\" .VE
'\" End of vertical sidebar.
'\"
'\" .DS
'\" Begin an indented unfilled display.
'\"
'\" .DE
'\" End of indented unfilled display.
'\"
|
|