Interface to the filesystem and file descriptor objects. Note that file descriptors are currently represented as integers, but may be replaced with opaque (and gc-managed) objects in a future release.
Creates the directory dir
, including any parent directories
as needed. Returns #t
on success and #f
on
failure.
The fundamental directory iterator. Applies kons
to
each filename in directory dir
and the result of the
previous application, beginning with knil
. With
kons
as cons
and knil
as '()
,
equivalent to directory-files
.
Returns a list of the files in dir
in an unspecified
order.
The fundamental directory traverser.
Unlinks the file named string
from the filesystem.
Returns #t
on success and #f
on failure.
Recursively delete all files and directories under dir
.
Unless optional arg ignore-errors?
is true, raises an error
if any file can't be deleted.
Runs thunk
with the current directory of the process temporarily
set to dir
.
Returns the status
object for the given file
,
which should be a string indicating the path or a file
descriptor.
File status accessors. x
should be a string indicating
the file to lookup the status for, or an existing status object.
Raises an error in the string case for non-existing files.
File type tests. x
should be a string indicating the
file to lookup the status for, or an existing status object.
Returns #t
if the file exists and the given type
is satisfied, and #f
otherwise.
File access tests. Returns true iff the current real UID and GID have the corresponding permissions on path. Equivalent to the test -r, -w, -x operators in sh.
Equivalent to duplicating the file descriptor old
to
new
and closing old
.
Returns the path the symbolic link file
points to, or
#f
on error.
Creates a hard link to the first arg from the second.
Returns #t
on success and #f
on failure.
Creates a symbolic link to the first arg from the second.
Returns #t
on success and #f
on failure.
Renames the first arg to the second.
Returns #t
on success and #f
on failure.
Returns the current working directory of the process as a string.
Change the current working directory of the process.
Creates a new directory with the given mode.
Returns #t
on success and #f
on failure.
Deletes the directory named string
from the filesystem.
Does not attempt to delete recursively.
Returns #t
on success and #f
on failure.
Duplicates the given file descriptor, returning he new value,
Copies the first file descriptor to the second, closing
it if needed.
Returns #t
on success and #f
on failure.
Closes the given file descriptor.
Returns #t
on success and #f
on failure.
Opens the given file and returns a file descriptor.
Returns a list of 2 new file descriptors, the input and output end of a new pipe, respectively.
Creates a new named pipe in the given path.
Returns #t
on success and #f
on failure.
Get and set the flags for the given file descriptor.
Get and set the status for the given file descriptor.
File opening modes.
Truncate the file to the given size.
(file-lock port-or-fileno int)
(const: int lock/shared)
(const: int lock/exclusive)
(const: int lock/non-blocking)
(const: int lock/unlock)
(const: int lock/shared)
(const: int lock/exclusive)
(const: int lock/non-blocking)
(const: int lock/unlock)
Applies the specified locking operation using flock(2) to the port or file-descriptor.Locking operations.
Sets the file permissions as in chmod.
Sets the file owner and group as in chown.
Returns #t
if the given port of file descriptor
if backed by a TTY object, and #f
otherwise.