Handbook
Glossary
delete-directory ( path -- )
Factor handbook
»
Input and output
»
Directory manipulation
»
Deleting, moving, and copying files
Prev:
delete-file ( path -- )
Next:
move-file ( from to -- )
Vocabulary
io
.
directories
Inputs
path
a pathname string
Outputs
None
Word description
Deletes a directory. The directory must be empty.
Errors
Throws an error if the directory could not be deleted.
Definition
USING:
io.backend
;
IN:
io.directories
HOOK:
delete-directory
io-backend
( path -- )
Methods
USING:
io.backend
io.directories
kernel
system
unix
unix.ffi
;
M:
unix
delete-directory
normalize-path
[
rmdir
]
unix-system-call
drop
;