Handbook
Glossary
windows-absolute-path? ( path -- ? )
Vocabulary
io
.
pathnames
.
private
Inputs
path
a pathname string
Outputs
?
a
boolean
Word description
Tests if a pathname is absolute on Windows. Examples of absolute pathnames on Windows are
c:\foo\bar
and
\\?\c:\foo\bar
for absolute Unicode pathnames.
See also
absolute-path?
,
root-directory?
Definition
USING:
combinators
kernel
math
sequences
;
IN:
io.pathnames.private
:
windows-absolute-path?
( path -- ? )
{
{
[
dup
"\\\\?\\"
head?
]
[
t
]
}
{
[
dup
length
2
<
]
[
f
]
}
{
[
dup
second
58
=
]
[
t
]
}
[
f
]
}
cond
nip
;