Handbook
Glossary
safe-file-name ( path -- path' )
Vocabulary
io
.
files
.
trash
.
unix
.
private
Inputs
path
an
object
Outputs
path'
an
object
Definition
USING:
io.directories
io.files
io.pathnames
kernel
math
;
IN:
io.files.trash.unix.private
:
safe-file-name
( path -- path' )
dup
0
[
over
file-exists?
]
[
[
parent-directory
to-directory
]
[
1
+
]
bi*
[
(safe-file-name)
]
keep
]
while
drop
nip
;