The Hackerlab at `regexps.com`

## An Errorless Front-end to the VU File-system Interface

up: libhackerlab next: File-name Manipulation Functions prev: VU Utilities

These functions perform I/O but never return errors. If an error occurs, they print a message and abort the program.

Function `safe_access`

    int safe_access (char * path, int mode);

See vu_access.

If mode is F_OK and the file does not exist, return `-1` .

Function `safe_chdir`

    int safe_chdir (char * path);

See vu_chdir.

Function `safe_chmod`

    int safe_chmod (char * path, int mode);

See vu_chmod.

Function `safe_chown`

    int safe_chown (char * path, int owner, int group);

See vu_chown.

Function `safe_chroot`

    int safe_chroot (char * path);

See vu_chroot.

Function `safe_close`

    int safe_close (int fd);

See vu_close.

Function `safe_closedir`

    int safe_closedir (DIR * dir);

See vu_closedir.

Function `safe_fchdir`

    int safe_fchdir (int fd);

See vu_fchdir.

Function `safe_fchmod`

    int safe_fchmod (int fd, int mode);

See vu_fchmod.

Function `safe_fchown`

    int safe_fchown (int fd, int owner, int group);

See vu_fchown.

Function `safe_fstat`

    int safe_fstat (int fd, struct stat * buf);

See vu_fstat.

Function `safe_fsync`

    int safe_fsync (int fd);

See vu_fsync.

Function `safe_ftruncate`

    int safe_ftruncate (int fd, long where);

See vu_ftruncate.

Function `safe_link`

    int safe_link (char * from, char * to);

See vu_link.

Function `safe_lseek`

    long safe_lseek (int fd, long offset, int whence);

See vu_lseek.

Function `safe_lstat`

    int safe_lstat (char * path, struct stat * buf);

See vu_lstat.

Function `safe_mkdir`

    int safe_mkdir (char * path, int mode);

See vu_mkdir.

Function `safe_open`

    int safe_open (char * path, int flags, int mode);

See vu_open.

Function `safe_opendir`

    int safe_opendir (DIR ** retv, char * path);

See vu_opendir.

Function `safe_read`

    long safe_read (int fd, char * buf, long count);

See vu_read.

Function `safe_read_retry`

    long safe_read_retry (int fd, char * buf, long count);

See vu_read_retry.

Function `safe_readdir`

    int safe_readdir (char ** file_ret, DIR * dir);

See vu_readdir.

Function `safe_readlink`

    int safe_readlink (char * path, char * buf, int bufsize);

See vu_readlink.

Function `safe_rename`

    int safe_rename (char * from, char * to);

See vu_rename.

Function `safe_rmdir`

    int safe_rmdir (char * path);

See vu_rmdir.

Function `safe_stat`

    int safe_stat (char * path, struct stat * buf);

See vu_stat.

Function `safe_symlink`

    int safe_symlink (char * from, char * to);

See vu_symlink.

Function `safe_truncate`

    int safe_truncate (char * path, long where);

See vu_truncate.

Function `safe_unlink`

    int safe_unlink (char * path);

See vu_unlink.

Function `safe_utime`

    int safe_utime (char * path, struct utimbuf * times);

See vu_utime.

Function `safe_write`

    long safe_write (int fd, char * buf, long count);

See vu_write.

Function `safe_write_retry`

    long safe_write_retry (int fd, t_uchar * buf, int amt);

See vu_write_retry.

Function `safe_fcntl`

    int safe_fcntl (int fd, int cmd, long arg);

See vu_fcntl.

Function `safe_dup`

    int safe_dup (int fd);

See vu_dup.

Function `safe_dup2`

    int safe_dup2 (int fd, int newfd);

See vu_dup2.

Function `safe_move_state`

    int safe_move_state (int fd, int newfd);

See vu_move_state.

libhackerlab: The Hackerlab C Library
The Hackerlab at `regexps.com`