with-directory-entries ( path quot -- ) (original) (raw)
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
: with-directory-entries ( path quot -- )
[ [ "" directory-entries ] ] dip compose with-directory ;
inline