## posix

Access to posix functions

### SYNOPSIS

ERROR MANAGEMENT
  *errno*

  (posix-perror str)

FILES AND DIRECTORIES
  (posix-stat filename)

  (posix-stat->vector descr)

  (posix-access filename mode)

  (posix-pipe)

TIME FUNCTIONS
  (posix-time)

  (posix-asctime)

  (posix-asctime seconds)

  (posix-ctime)

  (posix-ctime seconds)

  (posix-localtime seconds)

  (posix-gmtime seconds)

  (posix-mktime time)

  (posix-tm->vector time)

  (vector->posix-tm vect)

  (posix-strftime format)

  (posix-strftime format time)

PROCESSES FUNCTIONS

  (posix-fork)

  (posix-wait)

SYSTEM INFORMATIONS

  (posix-uname)

  (posix-host)

  (posix-domain)

### DESCRIPTION

The functions of the posix library must be loaded before use with:

    (require "posix")

The functions will not be described here completely. For full details about a functions and its behaviour, look at the corresponding Unix manual page or to the POSIX.1 document.

ERROR MANAGEMENT

*errno*
  is a variable which always contains the error number of last encountered error. It is equivalent to the errno POSIX.1 variable.

(posix-perror str)
  produces a message on the standard error output, describing the last error encountered during a call to a system or library function. The str parameter is an identifying string which will be printed before the error message. See perror(3).

FILES AND DIRECTORIES

(posix-stat filename)
  returns a C structure which contains a description of filename). This structure is not viewable by itself. Use, posix-stat->vector to access its content in Scheme.If filename does not exists, this procedure returns #f.

(posix-stat->vector descr)
  transforms a file description sructure obtained by posix-stat to a Scheme vector. The components of the vector are given here with their index:

    st_dev   (0)          st_ino    (1)
       st_mode  (2)          st_nlink  (3)
       st_uid   (4)          st_gid    (5)
       st_size  (6)          st_atime  (7)
       st_mtime (8)          st_ctime  (9)

    See fstat(2) for details on the semantic of this fields.

(posix-access filename mode)
  checks whether the interpreter is allowed to read, write, execute or test for existence of filename. Mode must be one of the following constants: |R_OK|, |W_OK|, |X_OK| or |F_OK|. If filename does not exit, this function returns #f. See access(2) for details.

(posix-pipe)
  returns a pair of Scheme ports associated to a pipe inode. If a pipe cannot be created, this function returns #f.

TO BE CONTINUED

Back to the STk main page