Handbook
Glossary
n>file-type ( n -- type )
Vocabulary
io
.
files
.
info
.
unix
Inputs
n
an
object
Outputs
type
an
object
Definition
USING:
combinators
io.files.types
kernel
math
unix.stat
;
IN:
io.files.info.unix
:
n>file-type
( n -- type )
S_IFMT
bitand
{
{
S_IFREG
[
+regular-file+
]
}
{
S_IFDIR
[
+directory+
]
}
{
S_IFCHR
[
+character-device+
]
}
{
S_IFBLK
[
+block-device+
]
}
{
S_IFIFO
[
+fifo+
]
}
{
S_IFLNK
[
+symbolic-link+
]
}
{
S_IFSOCK
[
+socket+
]
}
[
drop
+unknown+
]
}
case
;