When called as
(seek-file file), returns the distance in
bytes from the start of the file that the next character would be read
When called as
(seek-file file offset [where])
alters the position from which the next byte will be read. where
can be one of the values:
offset bytes after the current position.
offset bytes after the beginning of the file.
offset bytes before the end of the file.
Note that not all files may be seekable; if
file) returns false, indicating that the current position
is unknown, any attempts to set the current position will also fail.
This function flushes any buffered output to the file object file to disk.
Returns the name of the file which the file object file is
currently bound to. Returns false if the file is currently unbound
close-file was called on it).
The next three functions are used when non-local files are being accessed. See File Handlers for more details.
If the file object file doesn’t refer to a file in the local filing system, return the stream that it is bound to (allowing the file’s contents to be accessed), this may or may not be another file object.
Return the file-handler-specific data associated with the file object file.
Set the handler-specific data of file object file to data. This should only be done by the handler owning the file.
It’s also possible to register a callback function to be invoked when input is available on a file,
Arrange for function to be called whenever pending input is available on local-file, a file object bound to a file in the local file space.
Note that this makes local-file subsequently do non-blocking input.
This function is normally only useful when local-file represents a pipe or socket.