Handbook
Glossary
root-directory? ( path -- ? )
Vocabulary
io
.
pathnames
Inputs
path
a pathname string
Outputs
?
a
boolean
Word description
Tests if a pathname is a root directory. Examples of root directory pathnames are
/
on Unix and
c:\
on Windows.
See also
absolute-path?
,
windows-absolute-path?
Definition
USING:
io.backend
;
IN:
io.pathnames
HOOK:
root-directory?
io-backend
( path -- ? )
Methods
USING:
io.pathnames
kernel
sequences
;
M:
object
root-directory?
[
f
]
[
[
path-separator?
]
all?
]
if-empty
;