Next: posix fd, Previous: posix link, Up: posix [Index]
Interface to the C function mkdir()
, (libc)mkdir. Create a new directory file system entry with name
pathname; mode must be a fixnum specifying access
permissions. If successful return unspecified values, else raise an
exception.
Create a new directory file system entry with name pathname and all its parents if they do not exist; mode must be a fixnum specifying access permissions for all the components. If successful return unspecified values, else raise an exception.
Interface to the C function rmdir()
, (libc)rmdir. Remove the directory file system entry selected by
pathname. If successful return unspecified values, else raise an
exception.
Interface to the C function getcwd()
, (libc)getcwd. Acquire the pathname of the current working directory. If
successful getcwd
returns a bytevector holding the pathname,
getcwd/string
returns a string holding the pathname; else an
exception is raised.
Interface to the C function chdir()
, (libc)chdir. Change the current working directory to the file system entry
selected by pathname. If successful return unspecified values,
else raise an exception.
Interface to the C function fchdir()
, (libc)fchdir. Change the current working directory to the file system entry
associated to fd, which must be a fixnum representing a file
descriptor. If successful return unspecified values, else raise an
exception.
Opaque data structure type used in the inspection of file system
directory entries. Instances of this type can be destroyed by
closedir
, but they are also automatically and correctly destroyed
by the garbage collector. It has the following fields:
pathname
False or a string representing the pathname.
pointer
A pointer object referencing the directory.
fd
False or a fixnum representing the file descriptor associated to the directory.
closed?
A boolean, true if this stream has already been closed.
Constructor for directory-stream
.
Return true if obj is an instance of directory-stream
.
Accessors for the fields of directory-stream
.
Interface to the C function opendir()
, (libc)opendir. Open a directory stream for the inspection of the
file system entry pathname. If successful return an instance of
directory-stream
, else raise an exception.
Interface to the C function fdopendir()
, (libc)fdopendir. Open a directory stream for the inspection of
the file system entry associated to fd, which must be a fixnum
representing a file descriptor. If successful return an instance of
directory-stream
, else raise an exception.
Interface to the C function readdir()
, (libc)readdir. Acquire the next entry from a directory stream
referenced by stream, which must be an instance of
directory-stream
. If successful and an entry is available:
readdir
returns a pathname as a bytevector, readdir/string
returns a pathname as a string; if successful and no more entries are
available: return #f
; else raise an exception.
When no more entries are available or an error occurs: the directory stream is closed.
Interface to the C function closedir()
, (libc)closedir. Close the directory stream referenced by
stream, which must be an instance of directory-stream
. If
successful return unspecified values, else raise an exception.
This function has no effect if stream has been already closed.
Interface to the C function rewinddir()
, (libc)rewinddir. Rewind to the beginning the directory stream
referenced by stream, which must be an instance of
directory-stream
. Return unspecified values.
Interface to the C function telldir()
, (libc)telldir. Return an exact integer representing the current
position in the directory stream referenced by stream, which must
be an instance of directory-stream
.
Interface to the C function seekdir()
, (libc)seekdir. Set to pos the position of the directory
stream referenced by stream, which must be an instance of
directory-stream
; pos must be the return value of a
previous call to telldir
. Return unspecified values.
Next: posix fd, Previous: posix link, Up: posix [Index]