[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Directory manipulation

Function: sys-remove filenmae
[POSIX] If filename is a file it is removed. On some systems this may also work on an empty directory, but portable scripts shouldn't depend on it.

Function: sys-rename old new
[POSIX] Renames a file old to new. The new name can be in different directory from the old name, but both paths must be on the same device.

Function: sys-tmpnam
[POSIX] Creates a file name which is supposedly unique, and returns it. This is in POSIX, but its use is discouraged because of potential security risk. Use sys-mkstemp below if possible.

Function: sys-mkstemp template
Creates and opens a file that has unique name, and returns two values; opened port and the created filename. The file is created exclusively, avoiding race conditions. tmpname is used as the prefix of the file. Unlinke Unix's mkstemp, you don't need padding characters. The file is opened for writing, and its permission is set to 600.

Function: sys-link existing new
[POSIX] Creates a hard link named new to the existing file existing.

Function: sys-unlink pathname
[POSIX] Removes pathname. It can't be a directory. Returns #t if it is successfully removed, or #f if pathname doesn't exist. An error is signalled otherwise.

Function: sys-symlink existing new
Creates a symbolic link named new to the pathname existing. On systems that doesn't support symbolic links, this function is unbound.

Function: sys-readlink path
If a file specified by path is a symbolic link, its content is returned. If path doesn't exist or is not a symbolic link, an error is signalled. On systems that don't support symbolic links, this function is unbound.

Function: sys-mkdir pathname mode
[POSIX] Makes a directory pathname with mode mode. The parent directory of pathname must exist and be writable by the process. To create intermediate directories at once, use make-directory* in file.util (11.6.1 Directory utilities).

Function: sys-rmdir pathname
[POSIX] Removes a directory pathname. The directory must be empty. To remove a directory with its contents, use remove-directory* in file.util (11.6.1 Directory utilities).

Function: sys-umask mode
[POSIX] Sets umask setting to mode. Returns previous umask setting. See man umask for more details.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ken Dickey on November, 28 2002 using texi2html