Function: SB-EXT:DELETE-DIRECTORY¶
Deletes the directory designated by PATHSPEC (a pathname designator). Returns the truename of the directory deleted.
If RECURSIVE is false (the default), signals an error unless the directory is empty. If RECURSIVE is true, first deletes all files and subdirectories. If RECURSIVE is true and the directory contains symbolic links, the links are deleted, not the files and directories they point to.
Signals an error if PATHSPEC designates a file or a symbolic link instead of a directory, or if the directory could not be deleted for any reason.
Both
(DELETE-DIRECTORY “/tmp/foo”) (DELETE-DIRECTORY “/tmp/foo/”)
delete the “foo” subdirectory of “/tmp”, or signal an error if it does not exist or if is a file or a symbolic link.
Lambda list¶
(sb-impl::pathspec &key sb-impl::recursive)