Handbook
Glossary
mode>symbol ( mode -- ch )
Vocabulary
tools
.
files
.
unix
.
private
Inputs
mode
an
object
Outputs
ch
an
object
Definition
USING:
combinators
io.files.info.unix
kernel
math
unix.stat
;
IN:
tools.files.unix.private
:
mode>symbol
( mode -- ch )
S_IFMT
bitand
{
{
[
dup
S_IFDIR
=
]
[
drop
"/"
]
}
{
[
dup
S_IFIFO
=
]
[
drop
"|"
]
}
{
[
dup
any-execute?
]
[
drop
"*"
]
}
{
[
dup
S_IFLNK
=
]
[
drop
"@"
]
}
{
[
dup
S_IFWHT
=
]
[
drop
"%"
]
}
{
[
dup
S_IFSOCK
=
]
[
drop
"="
]
}
[
drop
""
]
}
cond
;