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
Hugo Ishimaru
asdf
Commits
51dd481a
Commit
51dd481a
authored
10 years ago
by
Robert P. Goldman
Browse files
Options
Downloads
Patches
Plain Diff
Simplify PARSE-NATIVE-NAMESTRING
Remove early check for absolute pathname, deferring to ENSURE-PATHNAME.
parent
22cd9340
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
-12
8 additions, 12 deletions
uiop/filesystem.lisp
with
8 additions
and
12 deletions
uiop/filesystem.lisp
+
8
−
12
View file @
51dd481a
...
...
@@ -40,22 +40,18 @@
(
if
(
os-unix-p
)
(
unix-namestring
p
)
(
namestring
p
)))))
(
defun
parse-native-namestring
(
string
&rest
constraints
&key
want-absolute
ensure-directory
&allow-other-keys
)
(
defun
parse-native-namestring
(
string
&rest
constraints
&key
ensure-directory
&allow-other-keys
)
"From a native namestring suitable for use by the operating system, return
a CL pathname satisfying all the specified constraints as per ENSURE-PATHNAME"
(
check-type
string
(
or
string
null
))
(
let*
((
pathname
(
when
string
(
unless
(
or
(
not
want-absolute
)
(
absolute-pathname-p
string
))
(
error
"Invalid pathname ~S: Expected an absolute pathname."
string
))
(
with-pathname-defaults
()
#+
clozure
(
ccl:native-to-pathname
string
)
#+
sbcl
(
sb-ext:parse-native-namestring
string
)
#-
(
or
clozure
sbcl
)
(
if
(
os-unix-p
)
(
parse-unix-namestring
string
:ensure-directory
ensure-directory
)
(
parse-namestring
string
)))))
(
with-pathname-defaults
()
#+
clozure
(
ccl:native-to-pathname
string
)
#+
sbcl
(
sb-ext:parse-native-namestring
string
)
#-
(
or
clozure
sbcl
)
(
if
(
os-unix-p
)
(
parse-unix-namestring
string
:ensure-directory
ensure-directory
)
(
parse-namestring
string
))))
(
pathname
(
if
ensure-directory
(
and
pathname
(
ensure-directory-pathname
pathname
))
...
...
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