Next: posix fd read, Up: posix fd [Index]
Interface to the C function open(), (libc)open. Open a file descriptor for the file system entry
pathname; flags and mode must be fixnums. If
successful return a fixnum representing the file descriptor, else raise
an exception.
Example:
#!r6rs
(import (vicare)
(prefix (vicare posix) px.)
(vicare platform constants))
(define fd
(px.open "name.ext"
(fxior O_CREAT O_EXCL O_RDWR)
(fxior S_IRUSR S_IWUSR)))
Interface to the C function close(), (libc)close. Close a file descriptor represented by fd, which
must be a fixnum. If successful return unspecified values, else raise
an exception.