
Next: Hash Tables
Up: Filesystem Utilities
Previous: Files
The directory management utilities are:
- (current-directory path)
sets the current working directory to path and returns #<void>.
If no path argument is provided, the name of the current
working directory is returned. If path cannot be made the current
directory, the exn:i/o:filesystem:directory exception is raised.
- (directory-exists? path)
returns #t if path refers to a directory or #f
otherwise.
- (make-directory path)
creates a new directory with the pathname path, returning
#t if a directory is created successfully or #f otherwise.
- (delete-directory path)
deletes an existing directory with the pathname path, returning
#t if the directory is deleted successfully or #f otherwise.
The directory must already be empty.
- (directory-list path)
returns a list of all files and directories in the directory
specified by path. If no path is provided, a list of
files and directories in the current directory is returned.
- (filesystem-root-list)
returns a list of all current root directories.
PLT