lispdoc - results for directory |
(directory pathspec &key (resolve-symlinks t)) | Function: Return a list of PATHNAMEs, each the TRUENAME of a file that matched the given pathname. Note that the interaction between this ANSI-specified TRUENAMEing and the semantics of the Unix filesystem (symbolic links..) means this function can sometimes return files which don't have the same directory as PATHNAME. If :RESOLVE-SYMLINKS is NIL, don't resolve symbolic links in matching filenames.
|
Example:(defun list-directory (dirname) "Return a list of the contents of the directory named by dirname. Names of subdirectories will be returned in `directory normal form'. Unlike CL:DIRECTORY, LIST-DIRECTORY does not accept wildcard pathnames; `dirname' should simply be a pathname that names a directory. It can be in either file or directory form." (when (wild-pathname-p dirname) (error "Can only list concrete directory names.")) (let ((wildcard (directory-wildcard dirname))) (directory wildcard))) | Mentioned in: CLtL2 - 23.1.4. Extended Wildcards CLtL2 - 23.1.5.3. Using Logical Pathnames CLtL2 - 23.5. Accessing Directories HyperSpec - 19.2.1.3 The Pathname Directory Component HyperSpec - 19.2.2.4.3 Restrictions on Examining a Pathname Directory Component HyperSpec - 19.2.2.4.3.1 Directory Components in Non-Hierarchical File Systems HyperSpec - 19.3.1.1.3 The Directory part of a Logical Pathname Namestring HyperSpec - Function DIRECTORY PCL - interacting with the file system PCL - listing a directory PCL - the api |
(pathname-directory pathname &key (case local)) | Function: Return PATHNAME's directory.
|
Example:(defun tl-merge-two-paths (new-path base) "Tries to merge two paths.." (let ((new-dir (append (pathname-directory base) (cdr (pathname-directory new-path))))) (make-pathname :name (pathname-name new-path) :type (pathname-type new-path) :directory new-dir))) | Mentioned in: CLtL2 - 23.1.2. Case Conventions CLtL2 - 23.1.3. Structured Directories CLtL2 - 23.1.6. Pathname Functions HyperSpec - Function PATHNAME-HOST, PATHNAME-DEVICE, PATHNAME-DIRECTORY, PATHNAME-NAME, PATHNAME-TYPE, PATHNAME-VERSION PCL - how pathnames represent filenames |
(directory-namestring pathname) | Function: Return a string representation of the directories used in the pathname.
|
| Mentioned in: CLtL2 - 23.1.6. Pathname Functions HyperSpec - Function NAMESTRING, FILE-NAMESTRING, DIRECTORY-NAMESTRING, HOST-NAMESTRING, ENOUGH-NAMESTRING PCL - how pathnames represent filenames | |
hunchentoot:*tmp-directory* | Variable: Directory for temporary files created by MAKE-TMP-FILE-NAME.
|
(cl-fad:walk-directory dirname fn &key directories (if-does-not-exist error) (test (constantly t))) | Function: Recursively applies the function FN to all files within the directory named by the non-wild pathname designator DIRNAME and all of its sub-directories. FN will only be applied to files for which the function TEST returns a true value. If DIRECTORIES is not NIL, FN and TEST are applied to directories as well. If DIRECTORIES is :DEPTH-FIRST, FN will be applied to the directory's contents first. If DIRECTORIES is :BREADTH-FIRST and TEST returns NIL, the directory's content will be skipped. IF-DOES-NOT-EXIST must be one of :ERROR or :IGNORE where :ERROR means that an error will be signaled if the directory DIRNAME does not exist.
|
(cl-fad:list-directory dirname) | Function: Returns a fresh list of pathnames corresponding to the truenames of all files within the directory named by the non-wild pathname designator DIRNAME. The pathnames of sub-directories are returned in directory form - see PATHNAME-AS-DIRECTORY.
|
(ql-dist:base-directory object) | Function: Return the base directory pathname of OBJECT.
|
(ql-clisp:rename-directory &rest args) | Undocumented
|
(asdf:directory-pathname-p pathname) | Function: Does PATHNAME represent a directory? A directory-pathname is a pathname _without_ a filename. The three ways that the filename components can be missing are for it to be NIL, :UNSPECIFIC or the empty string. Note that this does _not_ check to see that PATHNAME points to an actually-existing directory.
|
(ql-allegro:delete-directory &rest args) | Undocumented
|
(asdf:system-source-directory system-designator) | Function: Return a pathname object corresponding to the directory in which the system specification (.asd file) is located.
|
(ql-lispworks:delete-directory &rest args) | Undocumented
|
(asdf:ensure-directory-pathname pathspec) | Function: Converts the non-wild pathname designator PATHSPEC to directory form.
|
(cl-fad:directory-exists-p pathspec) | Function: Checks whether the file named by the pathname designator PATHSPEC exists and if it is a directory. Returns its truename if this is the case, NIL otherwise. The truename is returned in directory form as if by PATHNAME-AS-DIRECTORY.
|
(asdf:pathname-directory-pathname pathname) | Function: Returns a new pathname with same HOST, DEVICE, DIRECTORY as PATHNAME, and NIL NAME, TYPE and VERSION components
|
(cl-fad:directory-pathname-p pathspec) | Function: Returns NIL if PATHSPEC (a pathname designator) does not designate a directory, PATHSPEC otherwise. It is irrelevant whether file or directory designated by PATHSPEC does actually exist.
|
(cl-fad:pathname-as-directory pathspec) | Function: Converts the non-wild pathname designator PATHSPEC to directory form.
|
(ql-impl-util:rename-directory from to) | Undocumented
|
ql-impl-util:delete-directory | Undocumented
|
asdf:coerce-entry-to-directory | Undocumented
|
(cl-fad:delete-directory-and-files dirname &key (if-does-not-exist error)) | Function: Recursively deletes all files and directories within the directory designated by the non-wild pathname designator DIRNAME including DIRNAME itself. IF-DOES-NOT-EXIST must be one of :ERROR or :IGNORE where :ERROR means that an error will be signaled if the directory DIRNAME does not exist.
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |