Handbook
Glossary
write-directory-files ( path -- )
Vocabulary
tools
.
file-to-directory
Inputs
path
an
object
Outputs
None
Definition
USING:
base91
io.directories
io.encodings.binary
io.encodings.utf8
io.files
io.pathnames
kernel
modern
sequences
splitting
strings
;
IN:
tools.file-to-directory
:
write-directory-files
( path -- )
[
".modern"
?tail
drop
dup
make-directories
]
[
path>literals
]
bi
[
first
second
rest
[
dup
first
"DIRECTORY:"
head?
[
second
first
second
>string
make-directories
]
[
second
first2
[
second
>string
]
[
first3
nip
swap
"base91"
head?
[
base91>
binary
]
[
utf8
]
if
]
bi*
swapd
[
dup
parent-directory
make-directories
]
dip
set-file-contents
]
if
]
each
]
curry
with-directory
;