Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Moringen
asdf
Commits
d6e3fdc8
Commit
d6e3fdc8
authored
10 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
Improve docstrings for directory functions.
parent
f06a6aa8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uiop/filesystem.lisp
+8
-4
8 additions, 4 deletions
uiop/filesystem.lisp
with
8 additions
and
4 deletions
uiop/filesystem.lisp
+
8
−
4
View file @
d6e3fdc8
...
...
@@ -198,8 +198,8 @@ This function is used as a helper to DIRECTORY-FILES to avoid invalid entries wh
Subdirectories should NOT be returned.
PATTERN defaults to a pattern carefully chosen based on the implementation;
override the default at your own risk.
DIRECTORY-FILES tries NOT to resolve symlinks if the implementation
permits thi
s."
DIRECTORY-FILES tries NOT to resolve symlinks if the implementation
permits this,
but the behavior in presence of symlinks is not portable. Use IOlib to handle such situation
s."
(
let
((
dir
(
pathname
directory
)))
(
when
(
logical-pathname-p
dir
)
;; Because of the filtering we do below,
...
...
@@ -225,7 +225,8 @@ permits this."
:version
(
make-pathname-component-logical
(
pathname-version
f
)))))))))
(
defun
subdirectories
(
directory
)
"Given a DIRECTORY pathname designator, return a list of the subdirectories under it."
"Given a DIRECTORY pathname designator, return a list of the subdirectories under it.
The behavior in presence of symlinks is not portable. Use IOlib to handle such situations."
(
let*
((
directory
(
ensure-directory-pathname
directory
))
#-
(
or
abcl
cormanlisp
genera
xcl
)
(
wild
(
merge-pathnames*
...
...
@@ -265,7 +266,10 @@ permits this."
(
defun
collect-sub*directories
(
directory
collectp
recursep
collector
)
"Given a DIRECTORY, when COLLECTP returns true when CALL-FUNCTION'ed with the directory,
call-function the COLLECTOR function designator on the directory,
and recurse each of its subdirectories on which the RECURSEP returns true when CALL-FUNCTION'ed with them."
and recurse each of its subdirectories on which the RECURSEP returns true when CALL-FUNCTION'ed with them.
This function will thus let you traverse a filesystem hierarchy,
superseding the functionality of CL-FAD:WALK-DIRECTORY.
The behavior in presence of symlinks is not portable. Use IOlib to handle such situations."
(
when
(
call-function
collectp
directory
)
(
call-function
collector
directory
)
(
dolist
(
subdir
(
subdirectories
directory
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment