Next: , Previous: , Up: posix   [Index]


4.11 Hard and symbolic links

Function: link old_pathname new_pathname

Interface to the C function link(), (libc)link. Create a hard link new_pathname to the source file system entry old_pathname. If successful return zero, else raise an exception.

Function: symlink file_pathname link_pathname

Interface to the C function symlink(), (libc)symlink. Create a symbolic link link_pathname to the source file system entry file_pathname. If successful return zero, else raise an exception.

Function: readlink link_pathname
Function: readlink/string link_pathname

Interface to the C function readlink(), (libc)readlink. If pathname references a symbolic link: follow it once and return the referenced pathname; if an error occurs raise an exception. readlink returns a bytevector; readlink/string returns a string.

Function: realpath pathname
Function: realpath/string pathname

Interface to the C function realpath(), (libc)realpath. If pathname references a symbolic link: follow it and return the real canonicalised pathname; if an error occurs: an exception is raised. realpath returns a bytevector; realpath/string returns a string.

Function: unlink pathname

Interface to the C function unlink(), (libc)unlink. Delete the file system entry referenced by pathname, which must reference a file. If successful return unspecified values, else raise an exception.

This function is the same of delete-file defined by R6RS.

Function: remove pathname

Interface to the C function remove(), (libc)remove. Delete the file system entry referenced by pathname, which can reference a file or directory. If successful return unspecified values, else raise an exception.

Function: rename old-pathname new-pathname

Interface to the C function rename(), (libc)rename. Rename the file system entry old-pathname to new-pathname. If successful return unspecified values, else return an encoded errno value.


Next: , Previous: , Up: posix   [Index]