Next: Files and Symbolic Links, Previous: Environment, Up: Osicat
current-directoryreturns the operating system's current directory, which may or may not correspond to*default-pathname-defaults*.
setfcurrent-directorychanges the operating system's current directory to thepathspec. An error is signalled if thepathspecis wild or does not designate a directory.
Recursively deletes all files and directories within the directory designated by the non-wild pathname designator
dirnameincludingdirnameitself.if-does-not-existmust be one of:erroror:ignorewhere:errormeans that an error will be signaled if the directorydirnamedoes not exist.
Deletes the directory designated by
pathspec. Returnst. The directory must be empty. Symbolic links are not followed.Signals an error if
pathspecis wild, doesn't designate a directory, or if the directory could not be deleted.
Checks whether the file named by the pathname designator
pathspecexists and is a directory. Returns its truename if this is the case,nilotherwise. Follows symbolic links.
Returns a fresh list of pathnames corresponding to all files within the directory named by the non-wild pathname designator
pathspec. Ifbare-pathnamesis non-NIL only the files's bare pathnames are returned (with an empty directory component), otherwise the files' pathnames are merged withpathspec.
Applies function to each entry in directory designated by
pathspecin turn and returns a list of the results. Binds*default-pathname-defaults*to the directory designated by pathspec round to function call.If
pathspecdesignates a symbolic link, it is implicitly resolved.Signals an error if
pathspecis wild or doesn't designate a directory.
Recursively applies the function
fnto all files within the directory named by the non-wild pathname designatordirnameand all of its sub-directories. Returnston success.
fnwill only be applied to files for which the functiontestreturns a true value. Ifdirectoriesis notnil,fnandtestare applied to directories as well. Ifdirectoriesis:depth-first,fnwill be applied to the directory's contents first. Ifdirectoriesis:breadth-firstandtestreturnsnil, the directory's content will be skipped.if-does-not-existmust be one of:erroror:ignorewhere:errormeans that an error will be signaled if the directorydirnamedoes not exist.
pathspecmust 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,
iteratoris 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 returnnil.The value returned is the value of the last form evaluated in body. Signals an error if
pathspecis wild or does not designate a directory.