Handbook
Glossary
with-directory-entries ( path quot -- )
Factor handbook
»
Input and output
»
Directory manipulation
»
Directory listing
Prev:
directory-files ( path -- seq )
Next:
with-directory-files ( path quot -- )
Vocabulary
io
.
directories
Inputs
path
a pathname string
quot
a
quotation
Outputs
None
Word description
Calls the quotation with the directory entries on the stack and with the directory set as the
current-directory
. Restores the current directory after the quotation is called.
Definition
USING:
kernel
;
IN:
io.directories
:
with-directory-entries
( path quot -- )
[
[
""
directory-entries
]
]
dip
compose
with-directory
;
inline