Next: posix conditions, Up: posix [Index]
The following common arguments are specified:
It must be a non–negative fixnum repsesenting a platform’s file descriptor.
It must be a string or bytevector representing a file system entry.
It must be an instance of struct-stat
data structure, posix stat for details.
The proper data type for file system pathnames is the bytevector; all
the functions requiring a pathname as argument accept both a bytevector
and a string for convenience. String pathnames are converted to and
from bytevectors using the functions referenced by the parameters
string->filename-func
and filename->string-func
.
Whenever a system call returns a file system pathname: two functions are provided by the POSIX API, one returning a bytevector and one returning a string; the one returning a string has name ending with the suffix ‘/string’.
Whenever a function in the POSIX API fails: it raises an exception
with compound condition type &error
, &who
,
&message
, &irritants
; if the error is described by
an errno
value, an additional &errno
component is
present; if the function involves a file, an additional type
&i/o-filename
is present.
Values of the errno
C language variable are negated and encoded
as fixnums. Values of the h_errno
C language variable are
negated and encoded as fixnums.