Next: Users, Previous: Directories, Up: Osicat
Checks whether the file named by the pathname designator
pathspec
exists, if this is the case andfile-kind
is specified it also checks the file kind. If the tests succeed, return two values: truename and file kind ofpathspec
,nil
otherwise. Follows symbolic links.
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.
Returns a keyword indicating the kind of file designated by
pathspec
, ornil
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
. Iffollow-symlinks
is non-NIL andpathspec
designates a broken symlink returns:broken
as second value.Signals an error if
pathspec
is wild.
file-permissions
returns a list of keywords identifying the permissions ofpathspec
.
setf
file-permissions
sets the permissions ofpathspec
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.
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 ofpathspec
. Ifpathspec
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 usingwith-temporary-file
instead of this function.On failure, a
file-error
may be signalled.
Within the lexical scope of the body,
stream
is connected to a temporary file as created byopen-temporary-file
. The file is closed automatically oncebody
exits.
Creates
link
that points totarget
. 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.