Handbook
Glossary
permissions-string ( permissions -- str )
Vocabulary
tools
.
files
.
unix
.
private
Inputs
permissions
an
object
Outputs
str
an
object
Definition
USING:
accessors
arrays
combinators
combinators.smart
io.files.info.unix
kernel
sequences
strings
tools.files.private
;
IN:
tools.files.unix.private
:
permissions-string
( permissions -- str )
[
{
[
type>>
file-type>ch
1string
]
[
user-read?
read>string
]
[
user-write?
write>string
]
[
[
uid?
]
[
user-execute?
]
bi
2array
"s"
unix-execute>string
]
[
group-read?
read>string
]
[
group-write?
write>string
]
[
[
gid?
]
[
group-execute?
]
bi
2array
"s"
unix-execute>string
]
[
other-read?
read>string
]
[
other-write?
write>string
]
[
[
sticky?
]
[
other-execute?
]
bi
2array
"t"
unix-execute>string
]
}
cleave
]
output>array
concat
;