Handbook
Glossary
vocab-path ( path -- newpath )
Vocabulary
io
.
pathnames
Inputs
path
an
object
Outputs
newpath
an
object
Definition
IN:
io.pathnames
GENERIC:
vocab-path
( path -- newpath )
Methods
USING:
combinators
io.pathnames
kernel
sequences
strings
vocabs.loader.private
;
M:
string
vocab-path
dup
find-root-for
[
prepend-path
]
[
{
{
[
dup
?last
path-separator?
]
[
find-root-for-vocab-pathname
]
}
{
[
dup
has-file-extension?
]
[
[
ensure-parent-directory-is-not-dot
find-root-for-vocab-pathname
]
[
file-name
]
bi
append-path
]
}
[
find-root-for-vocab-pathname
]
}
cond
]
if*
;