osicat

API Reference

osicat

A lightweight operating system interface

OSICAT-SYS

  • Condition BUG  (ERROR)
  • Function BUG (control &rest args)
  • Condition SYSTEM-ERROR  (ERROR)
    Base class for errors signalled by Osicat.
  • Function SYSTEM-ERROR (control-string &rest args)
  • Condition UNSUPPORTED-FUNCTION  (ERROR)
    Condition signalled when an unsupported function is invoked.
  • Macro UNSUPPORTED-FUNCTION (name)
  • Macro DEFINE-UNSUPPORTED-FUNCTIONS (&body functions)
  • Function NATIVE-NAMESTRING (pathname)
  • Type FILENAME
  • Function FILENAME (filename)
  • Class FILENAME-DESIGNATOR  (ENHANCED-FOREIGN-TYPE)
    No slots.
  • Type FILE-DESCRIPTOR
  • Function FILE-DESCRIPTOR (file-descriptor)
  • Class FILE-DESCRIPTOR-DESIGNATOR  (ENHANCED-FOREIGN-TYPE)
    No slots.
  • Variable SIZE-OF-CHAR
    (cffi:foreign-type-size :char)
  • Variable SIZE-OF-INT
    (cffi:foreign-type-size :int)
  • Variable SIZE-OF-LONG
    (cffi:foreign-type-size :long)
  • Variable SIZE-OF-LONG-LONG
    (cffi:foreign-type-size :long-long)
  • Variable SIZE-OF-POINTER
    (cffi:foreign-type-size :pointer)
  • Variable SIZE-OF-SHORT
    (cffi:foreign-type-size :short)
  • Function GET-MONOTONIC-TIME
    Gets current time in seconds from a system's monotonic clock.

OSICAT-POSIX

  • Variable SIGINT
    2
    interrupt program.
  • Variable SIGILL
    4
    illegal instruction.
  • Variable SIGABRT
    6
    abort program (formerly SIGIOT).
  • Variable SIGFPE
    8
    floating-point exception.
  • Variable SIGSEGV
    11
    segmentation violation.
  • Variable SIGTERM
    15
    softwareermination signal.
  • Variable O-RDONLY
    0
  • Variable O-WRONLY
    1
  • Variable O-RDWR
    2
  • Variable O-CREAT
    64
  • Variable O-EXCL
    128
  • Variable O-TRUNC
    512
  • Variable O-APPEND
    1024
  • Variable O-NOCTTY
    256
  • Variable O-NONBLOCK
    2048
  • Variable O-NDELAY
    2048
  • Variable O-SYNC
    1052672
  • Variable O-NOFOLLOW
    131072
  • Variable O-ASYNC
    8192
  • Variable O-DIRECT
    16384
  • Variable O-DIRECTORY
    65536
  • Variable O-LARGEFILE
    0
  • Variable O-DSYNC
    4096
  • Variable O-RSYNC
    1052672
  • Variable SEEK-SET
    0
  • Variable SEEK-CUR
    1
  • Variable SEEK-END
    2
  • Variable R-OK
    4
  • Variable W-OK
    2
  • Variable X-OK
    1
  • Variable F-OK
    0
  • Variable S-IRWXU
    448
    read, write, execute/search by owner
  • Variable S-IRUSR
    256
    read permission, owner
  • Variable S-IWUSR
    128
    write permission, owner
  • Variable S-IXUSR
    64
    execute/search permission, owner
  • Variable S-IFMT
    61440
    bitmask for type of entry
  • Variable S-IFIFO
    4096
    named pipe, aka fifo
  • Variable S-IFCHR
    8192
    special character-device
  • Variable S-IFDIR
    16384
    directory
  • Variable S-IFBLK
    24576
    special block-device
  • Variable S-IFREG
    32768
    regular file
  • Variable S-IREAD
    256
  • Variable S-IWRITE
    128
  • Variable S-IEXEC
    64
  • Variable S-IRWXG
    56
    read, write, execute/search by group
  • Variable S-IRGRP
    32
    read permission, group
  • Variable S-IWGRP
    16
    write permission, group
  • Variable S-IXGRP
    8
    execute/search permission, group
  • Variable S-IRWXO
    7
    read, write, execute/search by others
  • Variable S-IROTH
    4
    read permission, others
  • Variable S-IWOTH
    2
    write permission, others
  • Variable S-IXOTH
    1
    execute/search permission, others
  • Variable S-ISUID
    2048
    set-user-ID on execution
  • Variable S-ISGID
    1024
    set-group-ID on execution
  • Variable S-ISVTX
    512
    'sticky' bit, many meanings, nonportable
  • Variable S-IFLNK
    40960
    symbolic link
  • Variable S-IFSOCK
    49152
    socket
  • Variable PATH-MAX
    4096
  • Cffi-Type TIME
  • Cffi-Struct TIMESPEC
  • Cffi-Struct STAT
  • Variable SIGHUP
    1
    terminal line hangup.
  • Variable SIGQUIT
    3
    quit program.
  • Variable SIGTRAP
    5
    trace trap.
  • Variable SIGKILL
    9
    kill program.
  • Variable SIGBUS
    7
    bus error.
  • Variable SIGSYS
    31
    non-existent system call invoked.
  • Variable SIGPIPE
    13
    write on a pipe with no reader.
  • Variable SIGALRM
    14
    real-timeimer expired.
  • Variable SIGURG
    23
    urgent condition present on socket.
  • Variable SIGSTOP
    19
    stop (cannot be caught or ignored).
  • Variable SIGTSTP
    20
    stop signal generated from keyboard.
  • Variable SIGCONT
    18
    continue after stop.
  • Variable SIGCHLD
    17
    child status has changed.
  • Variable SIGTTIN
    21
    background read attempted from control terminal.
  • Variable SIGTTOU
    22
    background write attempted from control terminal.
  • Variable SIGIO
    29
    I/O is possible on a descriptor (see fcntl(2)).
  • Variable SIGXCPU
    24
    cpuime limit exceeded (see setrlimit(2)).
  • Variable SIGXFSZ
    25
    file size limit exceeded (see setrlimit(2)).
  • Variable SIGVTALRM
    26
    virtualime alarm (see setitimer(2)).
  • Variable SIGPROF
    27
    profilingimer alarm (see setitimer(2)).
  • Variable SIGWINCH
    28
    Window size change.
  • Variable SIGUSR1
    10
    User defined signal 1.
  • Variable SIGUSR2
    12
    User defined signal 2.
  • Variable SIGRTMIN
    34
    Smallest real-time signal number.
  • Variable SIGRTMAX
    64
    Largest real-time signal number.
  • Variable SIGEV-NONE
    1
    No notification when the event occurs.
  • Variable SIGEV-SIGNAL
    0
    Generate a signal when the event occurs.
  • Variable SIGEV-THREAD
    2
    Call a function when the event occurs.
  • Variable SIGEV-THREAD-ID
    4
    Send a signal to a specific thread when the event occurs.
  • Variable F-DUPFD
    0
  • Variable F-GETFD
    1
  • Variable F-SETFD
    2
  • Variable F-GETFL
    3
  • Variable F-SETFL
    4
  • Variable F-GETLK
    5
  • Variable F-SETLK
    6
  • Variable F-SETLKW
    7
  • Variable F-GETOWN
    9
  • Variable F-SETOWN
    8
  • Variable F-RDLCK
    0
  • Variable F-WRLCK
    1
  • Variable F-UNLCK
    2
  • Variable F-GETSIG
    11
  • Variable F-SETSIG
    10
  • Variable F-SETLEASE
    1024
  • Variable F-GETLEASE
    1025
  • Variable F-LOCK
    1
  • Variable F-TLOCK
    2
  • Variable F-ULOCK
    0
  • Variable F-TEST
    3
  • Variable PROT-NONE
    0
    mmap: no protection
  • Variable PROT-READ
    1
    mmap: read protection
  • Variable PROT-WRITE
    2
    mmap: write protection
  • Variable PROT-EXEC
    4
    mmap: execute protection
  • Variable MAP-SHARED
    1
    mmap: shared memory
  • Variable MAP-PRIVATE
    2
    mmap: private mapping
  • Variable MAP-FIXED
    16
    mmap: map at location
  • Variable MAP-FAILED
    18446744073709551615
    mmap: failure
  • Variable MAP-NORESERVE
    16384
  • Variable MAP-LOCKED
    8192
  • Variable MAP-GROWSDOWN
    256
  • Variable MAP-ANON
    32
  • Variable MAP-ANONYMOUS
    32
  • Variable MAP-POPULATE
    32768
  • Variable MAP-NONBLOCK
    65536
  • Variable MREMAP-MAYMOVE
    1
  • Variable MREMAP-FIXED
    2
  • Variable MS-ASYNC
    1
    msync: return immediately
  • Variable MS-SYNC
    4
    msync: perform synchronous writes
  • Variable MS-INVALIDATE
    2
    msync: invalidate all data
  • Variable MCL-CURRENT
    1
    mlockall: lock currently mapped pages.
  • Variable MCL-FUTURE
    2
    mlockall: lock pages that become mapped.
  • Variable SC-AIO-LISTIO-MAX
    23
  • Variable SC-AIO-MAX
    24
  • Variable SC-AIO-PRIO-DELTA-MAX
    25
  • Variable SC-ARG-MAX
    0
  • Variable SC-ATEXIT-MAX
    87
  • Variable SC-BC-BASE-MAX
    36
  • Variable SC-BC-DIM-MAX
    37
  • Variable SC-BC-STRING-MAX
    39
  • Variable SC-CHILD-MAX
    1
  • Variable SC-CLK-TCK
    2
  • Variable SC-COLL-WEIGHTS-MAX
    40
  • Variable SC-DELAYTIMER-MAX
    26
  • Variable SC-EXPR-NEST-MAX
    42
  • Variable SC-HOST-NAME-MAX
    180
  • Variable SC-IOV-MAX
    60
  • Variable SC-LINE-MAX
    43
  • Variable SC-LOGIN-NAME-MAX
    71
  • Variable SC-NGROUPS-MAX
    3
  • Variable SC-GETGR-R-SIZE-MAX
    69
  • Variable SC-GETPW-R-SIZE-MAX
    70
  • Variable SC-MQ-OPEN-MAX
    27
  • Variable SC-MQ-PRIO-MAX
    28
  • Variable SC-OPEN-MAX
    4
  • Variable SC-ADVISORY-INFO
    132
  • Variable SC-BARRIERS
    133
  • Variable SC-ASYNCHRONOUS-IO
    12
  • Variable SC-CLOCK-SELECTION
    137
  • Variable SC-CPUTIME
    138
  • Variable SC-FILE-LOCKING
    147
  • Variable SC-FSYNC
    15
  • Variable SC-IPV6
    235
  • Variable SC-JOB-CONTROL
    7
  • Variable SC-MAPPED-FILES
    16
  • Variable SC-MEMLOCK
    17
  • Variable SC-MEMLOCK-RANGE
    18
  • Variable SC-MEMORY-PROTECTION
    19
  • Variable SC-MESSAGE-PASSING
    20
  • Variable SC-MONOTONIC-CLOCK
    149
  • Variable SC-MULTI-PROCESS
    150
  • Variable SC-PRIORITIZED-IO
    13
  • Variable SC-RAW-SOCKETS
    236
  • Variable SC-READER-WRITER-LOCKS
    153
  • Variable SC-REALTIME-SIGNALS
    9
  • Variable SC-REGEXP
    155
  • Variable SC-SAVED-IDS
    8
  • Variable SC-SEMAPHORES
    21
  • Variable SC-SHARED-MEMORY-OBJECTS
    22
  • Variable SC-SHELL
    157
  • Variable SC-SPAWN
    159
  • Variable SC-SPIN-LOCKS
    154
  • Variable SC-SPORADIC-SERVER
    160
  • Variable SC-SYMLOOP-MAX
    173
  • Variable SC-SYNCHRONIZED-IO
    14
  • Variable SC-THREAD-ATTR-STACKADDR
    77
  • Variable SC-THREAD-ATTR-STACKSIZE
    78
  • Variable SC-THREAD-CPUTIME
    139
  • Variable SC-THREAD-PRIO-INHERIT
    80
  • Variable SC-THREAD-PRIO-PROTECT
    81
  • Variable SC-THREAD-PROCESS-SHARED
    82
  • Variable SC-THREAD-SAFE-FUNCTIONS
    68
  • Variable SC-THREAD-SPORADIC-SERVER
    161
  • Variable SC-THREADS
    67
  • Variable SC-TIMEOUTS
    164
  • Variable SC-TIMERS
    11
  • Variable SC-TRACE
    181
  • Variable SC-TRACE-EVENT-FILTER
    182
  • Variable SC-TRACE-INHERIT
    183
  • Variable SC-TRACE-LOG
    184
  • Variable SC-TYPED-MEMORY-OBJECTS
    165
  • Variable SC-VERSION
    29
  • Variable SC-V6-ILP32-OFF32
    176
  • Variable SC-V6-ILP32-OFFBIG
    177
  • Variable SC-V6-LP64-OFF64
    178
  • Variable SC-V6-LPBIG-OFFBIG
    179
  • Variable SC-2-C-BIND
    47
  • Variable SC-2-C-DEV
    48
  • Variable SC-2-C-VERSION
    96
  • Variable SC-2-CHAR-TERM
    95
  • Variable SC-2-FORT-DEV
    49
  • Variable SC-2-FORT-RUN
    50
  • Variable SC-2-LOCALEDEF
    52
  • Variable SC-2-PBS
    168
  • Variable SC-2-PBS-ACCOUNTING
    169
  • Variable SC-2-PBS-CHECKPOINT
    175
  • Variable SC-2-PBS-LOCATE
    170
  • Variable SC-2-PBS-MESSAGE
    171
  • Variable SC-2-PBS-TRACK
    172
  • Variable SC-2-SW-DEV
    51
  • Variable SC-2-UPE
    97
  • Variable SC-2-VERSION
    46
  • Variable SC-REGEX-VERSION
    156
  • Variable SC-PAGE-SIZE
    30
  • Variable SC-PAGESIZE
    30
  • Variable SC-THREAD-DESTRUCTOR-ITERATIONS
    73
  • Variable SC-THREAD-KEYS-MAX
    74
  • Variable SC-THREAD-STACK-MIN
    75
  • Variable SC-THREAD-THREADS-MAX
    76
  • Variable SC-RE-DUP-MAX
    44
  • Variable SC-RTSIG-MAX
    31
  • Variable SC-SEM-NSEMS-MAX
    32
  • Variable SC-SEM-VALUE-MAX
    33
  • Variable SC-SIGQUEUE-MAX
    34
  • Variable SC-STREAM-MAX
    5
  • Variable SC-SYMLOOP-MAX
    173
  • Variable SC-TIMER-MAX
    35
  • Variable SC-TTY-NAME-MAX
    72
  • Variable SC-TZNAME-MAX
    6
  • Variable SC-XBS5-ILP32-OFF32
    125
  • Variable SC-XBS5-ILP32-OFFBIG
    126
  • Variable SC-XBS5-LP64-OFF64
    127
  • Variable SC-XBS5-LPBIG-OFFBIG
    128
  • Variable SC-XOPEN-CRYPT
    92
  • Variable SC-XOPEN-ENH-I18N
    93
  • Variable SC-XOPEN-LEGACY
    129
  • Variable SC-XOPEN-REALTIME
    130
  • Variable SC-XOPEN-REALTIME-THREADS
    131
  • Variable SC-XOPEN-SHM
    94
  • Variable SC-XOPEN-UNIX
    91
  • Variable SC-XOPEN-VERSION
    89
  • Variable SC-XOPEN-XCU-VERSION
    90
  • Variable IOV-MAX
    1024
  • Variable CLOCK-MONOTONIC
    1
  • Variable CLOCK-REALTIME
    0
  • Variable CLOCK-PROCESS-CPUTIME-ID
    2
  • Variable CLOCK-THREAD-CPUTIME-ID
    3
  • Variable TIMER-ABSTIME
    1
  • Cffi-Struct TIMESPEC
    UNIX time specification in seconds and nanoseconds.
  • Variable LOG-CONS
    2
  • Variable LOG-NDELAY
    8
  • Variable LOG-PERROR
    32
  • Variable LOG-PID
    1
  • Variable PRIO-PROCESS
    0
  • Variable PRIO-PGRP
    1
  • Variable PRIO-USER
    2
  • Variable RLIM-INFINITY
    18446744073709551615
  • Variable RUSAGE-SELF
    0
  • Variable RUSAGE-CHILDREN
    -1
  • Variable RLIMIT-AS
    9
  • Variable RLIMIT-CORE
    4
  • Variable RLIMIT-CPU
    0
  • Variable RLIMIT-DATA
    2
  • Variable RLIMIT-FSIZE
    1
  • Variable RLIMIT-MEMLOCK
    8
  • Variable RLIMIT-NOFILE
    7
  • Variable RLIMIT-NPROC
    6
  • Variable RLIMIT-RSS
    5
  • Variable RLIMIT-STACK
    3
  • Variable RLIM-SAVED-MAX
    18446744073709551615
  • Variable RLIM-SAVED-CUR
    18446744073709551615
  • Variable RLIMIT-LOCKS
    10
  • Variable RLIMIT-MSGQUEUE
    12
  • Variable RLIMIT-NLIMITS
    16
  • Variable RLIMIT-NICE
    13
  • Variable RLIMIT-RTPRIO
    14
  • Variable RLIMIT-SIGPENDING
    11
  • Cffi-Struct STATVFS
  • Variable ST-RDONLY
    1
  • Variable ST-NOSUID
    2
  • Variable ST-NODEV
    4
  • Variable ST-NOEXEC
    8
  • Variable ST-SYNCHRONOUS
    16
  • Variable ST-MANDLOCK
    64
  • Variable ST-WRITE
    128
  • Variable ST-APPEND
    256
  • Variable ST-IMMUTABLE
    512
  • Variable ST-NOATIME
    1024
  • Variable ST-NODIRATIME
    2048
  • Variable POSIX-VDISABLE
    0
  • Variable DT-UNKNOWN
    0
  • Variable DT-FIFO
    1
  • Variable DT-CHR
    2
  • Variable DT-DIR
    4
  • Variable DT-BLK
    6
  • Variable DT-REG
    8
  • Variable DT-LNK
    10
  • Variable DT-SOCK
    12
  • Variable DT-WHT
    14
  • Cffi-Struct WINSIZE
  • Variable TIOCGWINSZ
    21523
  • Variable TIOCSWINSZ
    21524
  • Variable TIOCNOTTY
    21538
  • Cffi-Struct TERMIOS
  • Variable CFLAG-VINTR
    0
  • Variable CFLAG-VQUIT
    1
  • Variable CFLAG-VERASE
    2
  • Variable CFLAG-VKILL
    3
  • Variable CFLAG-VEOF
    4
  • Variable CFLAG-VTIME
    5
  • Variable CFLAG-VMIN
    6
  • Variable CFLAG-VSWTC
    7
  • Variable CFLAG-VSTART
    8
  • Variable CFLAG-VSTOP
    9
  • Variable CFLAG-VSUSP
    10
  • Variable CFLAG-VEOL
    11
  • Variable CFLAG-VREPRINT
    12
  • Variable CFLAG-VDISCARD
    13
  • Variable CFLAG-VWERASE
    14
  • Variable CFLAG-VLNEXT
    15
  • Variable CFLAG-VEOL2
    16
  • Variable TCSANOW
    0
  • Variable TCSADRAIN
    1
  • Variable TCSAFLUSH
    2
  • Variable TTY-INLCR
    64
  • Variable TTY-ICRNL
    256
  • Variable TTY-IXON
    1024
  • Variable TTY-IXOFF
    4096
  • Variable TTY-ONLCR
    4
  • Variable TTY-OCRNL
    8
  • Variable TTY-ICANON
    2
  • Variable TTY-ECHO
    8
  • Variable SIOCGIFNAME
    35088
  • Variable SIOCSIFLINK
    35089
  • Variable SIOCGIFCONF
    35090
  • Variable SIOCGIFFLAGS
    35091
  • Variable SIOCSIFFLAGS
    35092
  • Variable SIOCGIFADDR
    35093
  • Variable SIOCSIFADDR
    35094
  • Variable SIOCGIFDSTADDR
    35095
  • Variable SIOCSIFDSTADDR
    35096
  • Variable SIOCGIFBRDADDR
    35097
  • Variable SIOCSIFBRDADDR
    35098
  • Variable SIOCGIFNETMASK
    35099
  • Variable SIOCSIFNETMASK
    35100
  • Variable SIOCGIFMETRIC
    35101
  • Variable SIOCSIFMETRIC
    35102
  • Variable SIOCGIFMEM
    35103
  • Variable SIOCSIFMEM
    35104
  • Variable SIOCGIFMTU
    35105
  • Variable SIOCSIFMTU
    35106
  • Variable SIOCSIFNAME
    35107
  • Variable SIOCSIFHWADDR
    35108
  • Variable SIOCGIFENCAP
    35109
  • Variable SIOCSIFENCAP
    35110
  • Variable SIOCGIFHWADDR
    35111
  • Variable SIOCGIFSLAVE
    35113
  • Variable SIOCSIFSLAVE
    35120
  • Variable SIOCADDMULTI
    35121
  • Variable SIOCDELMULTI
    35122
  • Variable SIOCGIFINDEX
    35123
  • Variable SIOGIFINDEX
    35123
  • Variable SIOCSIFPFLAGS
    35124
  • Variable SIOCGIFPFLAGS
    35125
  • Variable SIOCDIFADDR
    35126
  • Variable SIOCSIFHWBROADCAST
    35127
  • Variable SIOCGIFCOUNT
    35128
  • Variable SIOCGIFBR
    35136
  • Variable SIOCSIFBR
    35137
  • Variable SIOCGIFTXQLEN
    35138
  • Variable SIOCSIFTXQLEN
    35139
  • Variable SIOCDARP
    35155
  • Variable SIOCGARP
    35156
  • Variable SIOCSARP
    35157
  • Variable SIOCDRARP
    35168
  • Variable SIOCGRARP
    35169
  • Variable SIOCSRARP
    35170
  • Variable SIOCGIFMAP
    35184
  • Variable SIOCSIFMAP
    35185
  • Variable SIOCADDDLCI
    35200
  • Variable SIOCDELDLCI
    35201
  • Variable SIOCDEVPRIVATE
    35312
  • Variable SIOCPROTOPRIVATE
    35296
  • Variable TCGETS
    21505
  • Variable TCSETS
    21506
  • Variable TCSETSW
    21507
  • Variable TCSETSF
    21508
  • Variable TCGETA
    21509
  • Variable TCSETA
    21510
  • Variable TCSETAW
    21511
  • Variable TCSETAF
    21512
  • Variable TCSBRK
    21513
  • Variable TCXONC
    21514
  • Variable TCFLSH
    21515
  • Variable TIOCEXCL
    21516
  • Variable TIOCNXCL
    21517
  • Variable TIOCSCTTY
    21518
  • Variable TIOCGPGRP
    21519
  • Variable TIOCSPGRP
    21520
  • Variable TIOCOUTQ
    21521
  • Variable TIOCSTI
    21522
  • Variable TIOCMGET
    21525
  • Variable TIOCMBIS
    21526
  • Variable TIOCMBIC
    21527
  • Variable TIOCMSET
    21528
  • Variable TIOCGSOFTCAR
    21529
  • Variable TIOCSSOFTCAR
    21530
  • Variable FIONREAD
    21531
  • Variable TIOCINQ
    21531
  • Variable TIOCLINUX
    21532
  • Variable TIOCCONS
    21533
  • Variable TIOCGSERIAL
    21534
  • Variable TIOCSSERIAL
    21535
  • Variable TIOCPKT
    21536
  • Variable FIONBIO
    21537
  • Variable TIOCSETD
    21539
  • Variable TIOCGETD
    21540
  • Variable TCSBRKP
    21541
  • Variable TIOCSBRK
    21543
  • Variable TIOCCBRK
    21544
  • Variable TIOCGSID
    21545
  • Variable TIOCGPTN
    2147767344
  • Variable TIOCSPTLCK
    1074025521
  • Variable FIONCLEX
    21584
  • Variable FIOCLEX
    21585
  • Variable FIOASYNC
    21586
  • Variable TIOCSERCONFIG
    21587
  • Variable TIOCSERGWILD
    21588
  • Variable TIOCSERSWILD
    21589
  • Variable TIOCGLCKTRMIOS
    21590
  • Variable TIOCSLCKTRMIOS
    21591
  • Variable TIOCSERGSTRUCT
    21592
  • Variable TIOCSERGETLSR
    21593
  • Variable TIOCSERGETMULTI
    21594
  • Variable TIOCSERSETMULTI
    21595
  • Variable TIOCMIWAIT
    21596
  • Variable TIOCGICOUNT
    21597
  • Variable FIOQSIZE
    21600
  • Variable SYS-GETTID
    186
  • Condition POSIX-ERROR  (SYSTEM-ERROR)
    POSIX-ERRORs are signalled whenever ERRNO is set by a POSIX call or where the POSIX call signals an error via the return value.
  • Condition EPERM  (POSIX-ERROR)
  • Condition ENOENT  (POSIX-ERROR)
  • Condition ESRCH  (POSIX-ERROR)
  • Condition EINTR  (POSIX-ERROR)
  • Condition EIO  (POSIX-ERROR)
  • Condition ENXIO  (POSIX-ERROR)
  • Condition E2BIG  (POSIX-ERROR)
  • Condition ENOEXEC  (POSIX-ERROR)
  • Condition EBADF  (POSIX-ERROR)
  • Condition ECHILD  (POSIX-ERROR)
  • Condition EAGAIN  (POSIX-ERROR)
  • Condition ENOMEM  (POSIX-ERROR)
  • Condition EACCES  (POSIX-ERROR)
  • Condition EFAULT  (POSIX-ERROR)
  • Condition EBUSY  (POSIX-ERROR)
  • Condition EEXIST  (POSIX-ERROR)
  • Condition EXDEV  (POSIX-ERROR)
  • Condition ENODEV  (POSIX-ERROR)
  • Condition ENOTDIR  (POSIX-ERROR)
  • Condition EISDIR  (POSIX-ERROR)
  • Condition EINVAL  (POSIX-ERROR)
  • Condition ENFILE  (POSIX-ERROR)
  • Condition EMFILE  (POSIX-ERROR)
  • Condition ENOTTY  (POSIX-ERROR)
  • Condition EFBIG  (POSIX-ERROR)
  • Condition ENOSPC  (POSIX-ERROR)
  • Condition ESPIPE  (POSIX-ERROR)
  • Condition EROFS  (POSIX-ERROR)
  • Condition EMLINK  (POSIX-ERROR)
  • Condition EPIPE  (POSIX-ERROR)
  • Condition EDOM  (POSIX-ERROR)
  • Condition ERANGE  (POSIX-ERROR)
  • Condition EDEADLK  (POSIX-ERROR)
  • Condition ENAMETOOLONG  (POSIX-ERROR)
  • Condition ENOLCK  (POSIX-ERROR)
  • Condition ENOSYS  (POSIX-ERROR)
  • Condition ENOTEMPTY  (POSIX-ERROR)
  • Condition ENOSTR  (POSIX-ERROR)
  • Condition ENODATA  (POSIX-ERROR)
  • Condition ETIME  (POSIX-ERROR)
  • Condition ENOSR  (POSIX-ERROR)
  • Condition EILSEQ  (POSIX-ERROR)
  • Condition ESTALE  (POSIX-ERROR)
  • Condition ENOTBLK  (POSIX-ERROR)
  • Condition ETXTBSY  (POSIX-ERROR)
  • Condition EUSERS  (POSIX-ERROR)
  • Condition ELOOP  (POSIX-ERROR)
  • Condition EWOULDBLOCK  (POSIX-ERROR)
  • Condition ENOMSG  (POSIX-ERROR)
  • Condition EIDRM  (POSIX-ERROR)
  • Condition EPROTO  (POSIX-ERROR)
  • Condition EMULTIHOP  (POSIX-ERROR)
  • Condition EBADMSG  (POSIX-ERROR)
  • Condition EOVERFLOW  (POSIX-ERROR)
  • Condition EDQUOT  (POSIX-ERROR)
  • Condition EINPROGRESS  (POSIX-ERROR)
  • Condition EALREADY  (POSIX-ERROR)
  • Condition EPROTONOSUPPORT  (POSIX-ERROR)
  • Condition ESOCKTNOSUPPORT  (POSIX-ERROR)
  • Condition ENOTSOCK  (POSIX-ERROR)
  • Condition EDESTADDRREQ  (POSIX-ERROR)
  • Condition EMSGSIZE  (POSIX-ERROR)
  • Condition EPROTOTYPE  (POSIX-ERROR)
  • Condition ENOPROTOOPT  (POSIX-ERROR)
  • Condition EREMOTE  (POSIX-ERROR)
  • Condition ENOLINK  (POSIX-ERROR)
  • Condition EPFNOSUPPORT  (POSIX-ERROR)
  • Condition EAFNOSUPPORT  (POSIX-ERROR)
  • Condition EADDRINUSE  (POSIX-ERROR)
  • Condition EADDRNOTAVAIL  (POSIX-ERROR)
  • Condition ENETDOWN  (POSIX-ERROR)
  • Condition ENETUNREACH  (POSIX-ERROR)
  • Condition ENETRESET  (POSIX-ERROR)
  • Condition ECONNABORTED  (POSIX-ERROR)
  • Condition ECONNRESET  (POSIX-ERROR)
  • Condition EISCONN  (POSIX-ERROR)
  • Condition ENOTCONN  (POSIX-ERROR)
  • Condition ESHUTDOWN  (POSIX-ERROR)
  • Condition ETOOMANYREFS  (POSIX-ERROR)
  • Condition ETIMEDOUT  (POSIX-ERROR)
  • Condition ECONNREFUSED  (POSIX-ERROR)
  • Condition EHOSTDOWN  (POSIX-ERROR)
  • Condition EHOSTUNREACH  (POSIX-ERROR)
  • Condition ENONET  (POSIX-ERROR)
  • Condition ENOBUFS  (POSIX-ERROR)
  • Condition EOPNOTSUPP  (POSIX-ERROR)
  • Function POSIX-ERROR (&optional (errno (get-errno)) object syscall)
  • Cffi-Function LSEEK
  • Function LSEEK (fildes offset whence)
  • Cffi-Function TRUNCATE
  • Function TRUNCATE (path length)
  • Cffi-Function FTRUNCATE
  • Function FTRUNCATE (fd length)
  • Cffi-Function MMAP
  • Function MMAP (start length prot flags fd offset)
  • Cffi-Function MREMAP
  • Function MREMAP (old-address old-size new-size flags)
  • Cffi-Function PREAD
  • Function PREAD (fd buf count offset)
  • Cffi-Function PWRITE
  • Function PWRITE (fd buf count offset)
  • Cffi-Function POSIX-FALLOCATE
  • Function POSIX-FALLOCATE (fd offset length)
  • Cffi-Function GET-ERRNO
  • Function GET-ERRNO
  • Cffi-Function SET-ERRNO
  • Function SET-ERRNO (value)
  • Cffi-Function LOG-MASK
  • Function LOG-MASK (priority)
  • Cffi-Function LOG-UPTO
  • Function LOG-UPTO (priority)
  • Cffi-Function MKNOD
  • Function MKNOD (path mode dev)
  • Cffi-Function DIRFD
  • Function DIRFD (dir)
  • Cffi-Function S-ISREG
  • Function S-ISREG (mode)
  • Cffi-Function S-ISDIR
  • Function S-ISDIR (mode)
  • Cffi-Function S-ISCHR
  • Function S-ISCHR (mode)
  • Cffi-Function S-ISBLK
  • Function S-ISBLK (mode)
  • Cffi-Function S-ISFIFO
  • Function S-ISFIFO (mode)
  • Cffi-Function S-ISLNK
  • Function S-ISLNK (mode)
  • Cffi-Function S-ISSOCK
  • Function S-ISSOCK (mode)
  • Cffi-Function WIFEXITED
  • Function WIFEXITED (status)
  • Cffi-Function WIFSIGNALED
  • Function WIFSIGNALED (status)
  • Cffi-Function WCOREDUMP
  • Function WCOREDUMP (status)
  • Cffi-Function WIFCONTINUED
  • Function WIFCONTINUED (status)
  • Cffi-Function WIFSTOPPED
  • Function WIFSTOPPED (status)
  • Cffi-Function WEXITSTATUS
  • Function WEXITSTATUS (status)
  • Cffi-Function WTERMSIG
  • Function WTERMSIG (status)
  • Cffi-Function WSTOPSIG
  • Function WSTOPSIG (status)
  • Function STRERROR (&optional (err (get-errno)))
    Look up the error message string for ERRNO. (reentrant)
  • Function BZERO (buffer length)
  • Cffi-Function READ ((fd file-descriptor-designator) (buf pointer) (count size))
    Read at most COUNT bytes from FD into the foreign area BUF.
  • Function READ (fd buf count)
    Read at most COUNT bytes from FD into the foreign area BUF.
  • Cffi-Function WRITE ((fd file-descriptor-designator) (buf pointer) (count size))
    Write at most COUNT bytes to FD from the foreign area BUF.
  • Function WRITE (fd buf count)
    Write at most COUNT bytes to FD from the foreign area BUF.
  • Cffi-Function CHDIR ((path filename-designator))
    Changes the current working directory
  • Function CHDIR (path)
    Changes the current working directory
  • Function GETCWD
    Returns the current working directory as a string.
  • Cffi-Function RMDIR
  • Function RMDIR (path)
  • Variable *DEFAULT-OPEN-MODE*
    438
  • Function OPEN (pathname flags &optional (mode *default-open-mode*))
  • Cffi-Function CREAT
  • Function CREAT (pathname mode)
  • Function PIPE
    Create pipe, returns two values with the new FDs.
  • Cffi-Function CLOSE ((fd file-descriptor-designator))
    Close an open file descriptor.
  • Function CLOSE (fd)
    Close an open file descriptor.
  • Cffi-Function UNLINK
  • Function UNLINK (path)
  • Cffi-Function ACCESS
  • Function ACCESS (path amode)
  • Cffi-Function DUP
  • Function DUP (fildes)
  • Cffi-Function DUP2
  • Function DUP2 (fildes1 fildes2)
  • Cffi-Function CHMOD
  • Function CHMOD (path mode)
  • Cffi-Function SLEEP
  • Function SLEEP (seconds)
  • Function TIME
  • Class STAT
    DEV   Reader: STAT-DEV
    INO   Reader: STAT-INO
    MODE   Reader: STAT-MODE
    NLINK   Reader: STAT-NLINK
    UID   Reader: STAT-UID
    GID   Reader: STAT-GID
    RDEV   Reader: STAT-RDEV
    SIZE   Reader: STAT-SIZE
    BLKSIZE   Reader: STAT-BLKSIZE
    BLOCKS   Reader: STAT-BLOCKS
    ATIME   Reader: STAT-ATIME
    MTIME   Reader: STAT-MTIME
    CTIME   Reader: STAT-CTIME
  • Function STAT (path)
    Get information about a file.
  • Function FSTAT (fd)
    Get information about a file descriptor
  • Cffi-Function UMASK ((new-mode mode))
    Sets the umask and returns the old one
  • Function UMASK (new-mode)
    Sets the umask and returns the old one
  • Cffi-Function MKDIR ((path filename-designator) (mode mode))
    Create a directory.
  • Function MKDIR (path mode)
    Create a directory.
  • Function REALPATH (path)
    Returns the canonicalized absolute pathname
  • Function MKTEMP (&optional (template ""))
  • Function MKSTEMP (&optional (template ""))
  • Function MKDTEMP (&optional (template ""))
  • Cffi-Function FCHDIR
  • Function FCHDIR (fildes)
  • Cffi-Function LINK
  • Function LINK (path1 path2)
  • Cffi-Function ISATTY
  • Function ISATTY (fd)
  • Function READLINK (path)
    Read value of a symbolic link.
  • Cffi-Function SYMLINK ((name1 filename-designator) (name2 filename-designator))
    Creates a symbolic link
  • Function SYMLINK (name1 name2)
    Creates a symbolic link
  • Cffi-Function FCHMOD
  • Function FCHMOD (fd mode)
  • Cffi-Function SYNC
    Schedule all file system buffers to be written to disk.
  • Function SYNC
    Schedule all file system buffers to be written to disk.
  • Cffi-Function FSYNC
  • Function FSYNC (fildes)
  • Cffi-Function LOCKF ((fd file-descriptor-designator) (cmd int) (len off))
    Apply, test or remove a POSIX lock on an open file.
  • Function LOCKF (fd cmd len)
    Apply, test or remove a POSIX lock on an open file.
  • Function NICE (increment)
    Change process priority.
  • Cffi-Function FORK
    Create a child process.
  • Function FORK
    Create a child process.
  • Cffi-Function EXIT ((code int))
    Exit a process immediately.
  • Function EXIT (code)
    Exit a process immediately.
  • Function WAIT
    Wait for any child process to terminate.
  • Function WAITPID (pid &key (no-hang nil) (untraced nil))
    Wait for a specific child process to terminate
  • Cffi-Function GETEGID
    Get effective group id of the current process.
  • Function GETEGID
    Get effective group id of the current process.
  • Cffi-Function GETEUID
    Get effective user id of the current process.
  • Function GETEUID
    Get effective user id of the current process.
  • Cffi-Function GETGID
    Get real group id of the current process.
  • Function GETGID
    Get real group id of the current process.
  • Cffi-Function GETPGID ((pid pid))
    Get process group id of a process.
  • Function GETPGID (pid)
    Get process group id of a process.
  • Cffi-Function GETPGRP
    Get process group id of the current process.
  • Function GETPGRP
    Get process group id of the current process.
  • Cffi-Function GETPID
    Returns the process id of the current process
  • Function GETPID
    Returns the process id of the current process
  • Cffi-Function GETPPID
    Returns the process id of the current process's parent
  • Function GETPPID
    Returns the process id of the current process's parent
  • Cffi-Function GETUID
    Get real user id of the current process.
  • Function GETUID
    Get real user id of the current process.
  • Cffi-Function SETEGID ((gid gid))
    Set effective group id of the current process.
  • Function SETEGID (gid)
    Set effective group id of the current process.
  • Cffi-Function SETEUID ((uid uid))
    Set effective user id of the current process.
  • Function SETEUID (uid)
    Set effective user id of the current process.
  • Cffi-Function SETGID ((gid gid))
    Get real group id of the current process.
  • Function SETGID (gid)
    Get real group id of the current process.
  • Cffi-Function SETPGID ((pid pid) (pgid pid))
    Set process group id of a process.
  • Function SETPGID (pid pgid)
    Set process group id of a process.
  • Cffi-Function SETPGRP
    Set process group id of the current process.
  • Function SETPGRP
    Set process group id of the current process.
  • Cffi-Function SETREGID ((rgid gid) (egid gid))
    Set real and effective group id of the current process.
  • Function SETREGID (rgid egid)
    Set real and effective group id of the current process.
  • Cffi-Function SETREUID ((ruid uid) (euid uid))
    Set real and effective user id of the current process.
  • Function SETREUID (ruid euid)
    Set real and effective user id of the current process.
  • Cffi-Function SETSID
    Create session and set process group id of the current process.
  • Function SETSID
    Create session and set process group id of the current process.
  • Cffi-Function SETUID ((uid uid))
    Set real user id of the current process.
  • Function SETUID (uid)
    Set real user id of the current process.
  • Cffi-Function SETENV ((name string) (value string))
    Changes the value of an environment variable
  • Function SETENV (name value)
    Changes the value of an environment variable
  • Cffi-Function UNSETENV ((name string))
    Removes the binding of an environment variable
  • Function UNSETENV (name)
    Removes the binding of an environment variable
  • Cffi-Function USLEEP
  • Function USLEEP (useconds)
  • Function GETHOSTNAME
  • Function GETDOMAINNAME
  • Function SYSCONF (name)
    Get value of configurable system variables.
  • Function GETPAGESIZE
    Get memory page size.
  • Function FCNTL (fd cmd &optional (arg nil argp))
  • Function IOCTL (fd request &optional (arg nil argp))
    Control device.
  • Cffi-Function KILL ((pid pid) (sig int))
    Send signal to a process.
  • Function KILL (pid sig)
    Send signal to a process.
  • Cffi-Function MLOCK ((addr pointer) (len size))
    Lock a range of process address space.
  • Function MLOCK (addr len)
    Lock a range of process address space.
  • Cffi-Function MUNLOCK ((addr pointer) (len size))
    Unlock a range of process address space.
  • Function MUNLOCK (addr len)
    Unlock a range of process address space.
  • Cffi-Function MLOCKALL ((flags int))
    Lock the address space of a process.
  • Function MLOCKALL (flags)
    Lock the address space of a process.
  • Cffi-Function MUNLOCKALL
  • Function MUNLOCKALL
  • Cffi-Function MUNMAP ((addr pointer) (len size))
    Unmap pages of memory.
  • Function MUNMAP (addr len)
    Unmap pages of memory.
  • Cffi-Function MSYNC ((addr pointer) (len size) (flags int))
    Synchronize memory with physical storage.
  • Function MSYNC (addr len flags)
    Synchronize memory with physical storage.
  • Cffi-Function MPROTECT ((addr pointer) (len size) (flags int))
    Set protection of memory mapping.
  • Function MPROTECT (addr len flags)
    Set protection of memory mapping.
  • Function GETTIMEOFDAY
    Return the time in seconds and microseconds.
  • Function CLOCK-GETRES (clock-id)
  • Function CLOCK-GETTIME (clock-id)
    Returns the time of the clock CLOCKID.
  • Function CLOCK-SETTIME (clock-id)
    Sets the time of the clock CLOCKID.
  • Function TIMER-CREATE (clock-id notify-method &key signal notify-value function attributes thread-id)
    Creates a new per-process interval timer.
  • Cffi-Function TIMER-DELETE ((timer-id timer))
    Deletes the timer identified by TIMER-ID.
  • Function TIMER-DELETE (timer-id)
    Deletes the timer identified by TIMER-ID.
  • Cffi-Function TIMER-GETOVERRUN ((timer-id timer))
    Returns the overrun count for the timer identified by TIMER-ID.
  • Function TIMER-GETOVERRUN (timer-id)
    Returns the overrun count for the timer identified by TIMER-ID.
  • Function TIMER-GETTIME (timer-id)
    Returns the interval and the time until next expiration for the timer specified by TIMER-ID. Both the interval and the time are returned as seconds and nanoseconds, so four values are returned.
  • Function TIMER-SETTIME (timer-id flags interval-sec interval-nsec initial-sec initial-nsec &optional return-previous-p)
    Arms or disarms the timer identified by TIMER-ID.
  • Function LSTAT (path)
    Get information about a file or symlink.
  • Cffi-Function MKFIFO ((path filename-designator) (mode mode))
    Create a FIFO (named pipe).
  • Function MKFIFO (path mode)
    Create a FIFO (named pipe).
  • Function OPENLOG (name options &optional (facility :user))
    Open system log.
  • Function SYSLOG (priority format &rest args)
    Send a message to the syslog facility, with severity level PRIORITY. The message will be formatted by CL:FORMAT (rather than C's printf) with format string FORMAT and arguments ARGS.
  • Function CLOSELOG
    Close system log.
  • Cffi-Function SETLOGMASK
  • Function SETLOGMASK (mask)
  • Function GETRLIMIT (resource)
  • Function SETRLIMIT (resource soft-limit hard-limit)
  • Function GETRUSAGE (who)
  • Cffi-Function GETPRIORITY
  • Function GETPRIORITY (which who)
  • Cffi-Function SETPRIORITY
  • Function SETPRIORITY (which who value)
  • Function UNAME
    Get name and information about current kernel.
  • Function STATVFS (path)
    Retrieve file system information.
  • Function FSTATVFS (fd)
    Retrieve file system information.
  • Function GETPWUID (uid)
    Gets the password-entry of a user, by user id.
  • Function GETPWNAM (name)
    Gets the password-entry of a user, by username.
  • Function GETGRGID (gid)
    Gets a group-entry, by group id. (reentrant)
  • Function GETGRNAM (name)
    Gets a group-entry, by group name. (reentrant)
  • Cffi-Function OPENDIR ((filename filename-designator))
    Opens a directory for listing of its contents
  • Function OPENDIR (filename)
    Opens a directory for listing of its contents
  • Cffi-Function CLOSEDIR ((dir pointer))
    Closes a directory when done listing its contents
  • Function CLOSEDIR (dir)
    Closes a directory when done listing its contents
  • Function READDIR (dir)
    Reads an item from the listing of a directory (reentrant)
  • Cffi-Function REWINDDIR ((dir pointer))
    Rewinds a directory.
  • Function REWINDDIR (dir)
    Rewinds a directory.
  • Cffi-Function SEEKDIR ((dir pointer) (pos long))
    Seeks a directory.
  • Function SEEKDIR (dir pos)
    Seeks a directory.
  • Cffi-Function TELLDIR ((dir pointer))
    Returns the current location in a directory
  • Function TELLDIR (dir)
    Returns the current location in a directory
  • Cffi-Function READV
  • Function READV (fd iov count)
  • Cffi-Function WRITEV
  • Function WRITEV (fd iov count)
  • Cffi-Function TCGETATTR
  • Function TCGETATTR (fd termios)
  • Cffi-Function TCSETATTR
  • Function TCSETATTR (fd mode termios)
  • Cffi-Function FDATASYNC
  • Function FDATASYNC (fd)
  • Cffi-Function SYSCALL ((number int))
    Invoke the system call whose assembly language interface is selected with NUMBER.
  • Function SYSCALL (number)
    Invoke the system call whose assembly language interface is selected with NUMBER.
  • Function GETTID
    Returns the thread ID of the calling thread.
  • Function FD-OPEN-P (fd)
  • Macro REPEAT-UPON-CONDITION ((&rest conditions) &body body)
  • Macro REPEAT-UPON-EINTR (&body body)
  • Macro REPEAT-DECREASING-TIMEOUT ((timeout-var timeout &optional (block-name nil blockp)) &body body)
  • Macro REPEAT-UPON-CONDITION-DECREASING-TIMEOUT (((&rest conditions) timeout-var timeout &optional (block-name nil blockp)) &body body)

OSICAT

Osicat is a lightweight operating system interface for Common
Lisp on Unix-platforms.  It is not a POSIX-style API, but rather
a simple lispy accompaniment to the standard ANSI facilities.

Osicat homepage:

  http://www.common-lisp.net/project/osicat/

Concepts:

Designated directory

  When a relative pathname designator is used as a directory
  designator it is first resolved against
  *DEFAULT-PATHNAME-DEFAULT*, and then against the current
  directory. (With MERGE-PATHNAMES in both cases.)
  • Function ENVIRONMENT-VARIABLE (name)
    ENVIRONMENT-VARIABLE returns the environment variable identified by NAME, or NIL if one does not exist. NAME can either be a symbol or a string. SETF ENVIRONMENT-VARIABLE sets the environment variable identified by NAME to VALUE. Both NAME and VALUE can be either a symbols or strings. Signals an error on failure.
  • Function (setf ENVIRONMENT-VARIABLE) (value name)
  • Function MAKUNBOUND-ENVIRONMENT-VARIABLE (name)
    Removes the environment variable identified by NAME from the current environment. NAME can be either a string or a symbol. Returns the string designated by NAME. Signals an error on failure.
  • Function ENVIRONMENT
    ENVIRONMENT returns the current environment as an assoc-list. SETF ENVIRONMENT modifies the environment its argument. Often it is preferable to use SETF ENVIRONMENT-VARIABLE and MAKUNBOUND-ENVIRONMENT-VARIABLE to modify the environment instead of SETF ENVIRONMENT.
  • Function (setf ENVIRONMENT) (alist)
  • Function ABSOLUTE-PATHNAME-P (pathspec)
    Returns T if the PATHSPEC designates an absolute pathname, NIL otherwise.
  • Function RELATIVE-PATHNAME-P (pathspec)
    Returns T if the PATHSPEC designates a relative pathname, NIL otherwise.
  • Function ABSOLUTE-PATHNAME (pathspec &optional (default *default-pathname-defaults*))
    Returns an absolute pathname corresponding to PATHSPEC by merging it with DEFAULT, and (CURRENT-DIRECTORY) if necessary.
  • Function UNMERGE-PATHNAMES (pathspec &optional (default *default-pathname-defaults*))
    Removes those leading directory components from PATHSPEC that are shared with DEFAULT.
  • Function DIRECTORY-PATHNAME-P (pathspec)
    Returns NIL if PATHSPEC (a pathname designator) does not designate a directory, PATHSPEC otherwise. It is irrelevant whether file or directory designated by PATHSPEC does actually exist.
  • Function PATHNAME-AS-DIRECTORY (pathspec)
    Converts the non-wild pathname designator PATHSPEC to directory form.
  • Function PATHNAME-DIRECTORY-PATHNAME (pathspec)
    Returns the directory part of PATHSPEC as a pathname.
  • Function PATHNAME-AS-FILE (pathspec)
    Converts the non-wild pathname designator PATHSPEC to file form.
  • Function FILE-KIND (pathspec &key follow-symlinks)
    Returns a keyword indicating the kind of file designated by PATHSPEC, or NIL if the file does not exist. Does not follow symbolic links by default. Possible file-kinds in addition to NIL are: :REGULAR-FILE, :SYMBOLIC-LINK, :DIRECTORY, :PIPE, :SOCKET, :CHARACTER-DEVICE, and :BLOCK-DEVICE. If FOLLOW-SYMLINKS is non-NIL and PATHSPEC designates a broken symlink returns :BROKEN as second value. Signals an error if PATHSPEC is wild.
  • Function FILE-EXISTS-P (pathspec &optional file-kind)
    Checks whether the file named by the pathname designator PATHSPEC exists, if this is the case and FILE-KIND is specified it also checks the file kind. If the tests succeed, return two values: truename and file kind of PATHSPEC, NIL otherwise. Follows symbolic links.
  • Function REGULAR-FILE-EXISTS-P (pathspec)
    Checks whether the file named by the pathname designator PATHSPEC exists and is a regular file. Returns its truename if this is the case, NIL otherwise. Follows symbolic links.
  • Function DIRECTORY-EXISTS-P (pathspec)
    Checks whether the file named by the pathname designator PATHSPEC exists and is a directory. Returns its truename if this is the case, NIL otherwise. Follows symbolic links.
  • Function GOOD-SYMLINK-EXISTS-P (pathspec)
    Checks whether the file named by the pathname designator PATHSPEC exists and is a symlink pointing to an existent file.
  • Variable *TEMPORARY-DIRECTORY*
    (let ((osicat::system-tmpdir
           (coerce (osicat:environment-variable "tmpdir") 'string)))
      (if (string= "" osicat::system-tmpdir)
          (make-pathname :directory '(:absolute "tmp"))
          (pathname (concatenate 'string osicat::system-tmpdir "/"))))
  • Function OPEN-TEMPORARY-FILE (&key (pathspec *temporary-directory*) (element-type 'character) (external-format :default))
    Creates a temporary file setup for input and output, and returns a stream connected to that file. PATHSPEC serves as template for the file to be created: a certain number of random characters will be concatenated to the file component of PATHSPEC. If PATHSPEC has no directory component, the file will be created inside *TEMPORARY-DIRECTORY*. The file itself is unlinked once it has been opened. ELEMENT-TYPE specifies the unit of transaction of the stream. Consider using WITH-TEMPORARY-FILE instead of this function. On failure, a FILE-ERROR may be signalled.
  • Macro WITH-TEMPORARY-FILE ((stream &key (pathspec *temporary-directory*) (element-type 'character) (external-format :default)) &body body)
    Within the lexical scope of the body, STREAM is connected to a temporary file as created by OPEN-TEMPORARY-FILE. The file is closed automatically once BODY exits.
  • Macro WITH-DIRECTORY-ITERATOR ((iterator pathspec) &body body)
    PATHSPEC must be a valid directory designator: *DEFAULT-PATHNAME-DEFAULTS* is bound, and (CURRENT-DIRECTORY) is set to the designated directory for the dynamic scope of the body. Within the lexical scope of the body, ITERATOR is defined via macrolet such that successive invocations of (ITERATOR) return the directory entries, one by one. Both files and directories are returned, except '.' and '..'. The order of entries is not guaranteed. The entries are returned as relative pathnames against the designated directory. Entries that are symbolic links are not resolved, but links that point to directories are interpreted as directory designators. Once all entries have been returned, further invocations of (ITERATOR) will all return NIL. The value returned is the value of the last form evaluated in body. Signals an error if PATHSPEC is wild or does not designate a directory.
  • Function MAPDIR (function pathspec)
    Applies function to each entry in directory designated by PATHSPEC in turn and returns a list of the results. Binds *DEFAULT-PATHNAME-DEFAULTS* to the directory designated by pathspec round to function call. If PATHSPEC designates a symbolic link, it is implicitly resolved. Signals an error if PATHSPEC is wild or doesn't designate a directory.
  • Function LIST-DIRECTORY (pathspec &key bare-pathnames)
    Returns a fresh list of pathnames corresponding to all files within the directory named by the non-wild pathname designator PATHSPEC. If BARE-PATHNAMES is non-NIL only the files's bare pathnames are returned (with an empty directory component), otherwise the files' pathnames are merged with PATHSPEC.
  • Function DELETE-DIRECTORY (pathspec)
    Deletes the directory designated by PATHSPEC. Returns T. The directory must be empty. Symbolic links are not followed. Signals an error if PATHSPEC is wild, doesn't designate a directory, or if the directory could not be deleted.
  • Function WALK-DIRECTORY (dirname fn &key directories (if-does-not-exist :error) (test (constantly t)))
    Recursively applies the function FN to all files within the directory named by the non-wild pathname designator DIRNAME and all of its sub-directories. Returns T on success. FN will only be applied to files for which the function TEST returns a true value. If DIRECTORIES is not NIL, FN and TEST are applied to directories as well. If DIRECTORIES is :DEPTH-FIRST, FN will be applied to the directory's contents first. If DIRECTORIES is :BREADTH-FIRST and TEST returns NIL, the directory's content will be skipped. IF-DOES-NOT-EXIST must be one of :ERROR or :IGNORE where :ERROR means that an error will be signaled if the directory DIRNAME does not exist.
  • Function DELETE-DIRECTORY-AND-FILES (dirname &key (if-does-not-exist :error))
    Recursively deletes all files and directories within the directory designated by the non-wild pathname designator DIRNAME including DIRNAME itself. IF-DOES-NOT-EXIST must be one of :ERROR or :IGNORE where :ERROR means that an error will be signaled if the directory DIRNAME does not exist.
  • Function READ-LINK (pathspec)
    Returns the pathname pointed to by the symbolic link designated by PATHSPEC. If the link is relative, then the returned pathname is relative to the link, not *DEFAULT-PATHNAME-DEFAULTS*. Signals an error if PATHSPEC is wild, or does not designate a symbolic link.
  • Function MAKE-LINK (link &key target hard)
    Creates LINK that points to TARGET. Defaults to a symbolic link, but giving a non-NIL value to the keyword argument :HARD creates a hard link. Returns the pathname of the link. Relative targets are resolved against the link. Relative links are resolved against *DEFAULT-PATHNAME-DEFAULTS*. Signals an error if either target or link is wild, target does not exist, or link exists already.
  • Function FILE-PERMISSIONS (pathspec)
    FILE-PERMISSIONS returns a list of keywords identifying the permissions of PATHSPEC. SETF FILE-PERMISSIONS sets the permissions of PATHSPEC as identified by the symbols in list. If PATHSPEC designates a symbolic link, that link is implicitly resolved. Permission symbols consist of :USER-READ, :USER-WRITE, :USER-EXEC, :GROUP-READ, :GROUP-WRITE, :GROUP-EXEC, :OTHER-READ, :OTHER-WRITE, :OTHER-EXEC, :SET-USER-ID, :SET-GROUP-ID, and :STICKY. Both signal an error if PATHSPEC is wild, or doesn't designate an existing file.
  • Function (setf FILE-PERMISSIONS) (perms pathspec)
  • Function CURRENT-DIRECTORY
    CURRENT-DIRECTORY returns the operating system's current directory, which may or may not correspond to *DEFAULT-PATHNAME-DEFAULTS*. SETF CURRENT-DIRECTORY changes the operating system's current directory to the PATHSPEC. An error is signalled if the PATHSPEC is wild or does not designate a directory.
  • Function (setf CURRENT-DIRECTORY) (pathspec)
  • Function USER-INFO (id)
    USER-INFO returns the password entry for the given name or numerical user ID, as an assoc-list.

Also exports

  • OSICAT-SYS:SYSTEM-ERROR
  • OSICAT-SYS:SYSTEM-ERROR-MESSAGE
  • OSICAT-SYS:SYSTEM-ERROR-CODE
  • OSICAT-SYS:NATIVE-NAMESTRING
  • OSICAT-SYS:SYSTEM-ERROR-IDENTIFIER
  • OSICAT-SYS:GET-MONOTONIC-TIME