Next: Networking
Up: Filesystem Utilities
Previous: Files
The directory management utilities are:
-
(current-directory)
returns the current directory and (current-directory path) sets the current directory to path.
This procedure is actually a parameter, as described in
section 9.4.1.1.
- (current-drive) returns the
current drive name under Windows. For other platforms, the
exn:misc:unsupported exception is raised. The current drive is always
the drive of the current directory.
-
(directory-exists? path)
returns #t if path refers to a directory, #f
otherwise. Unlike other procedures that take a path argument, this
procedure never raises the exn:i/o:filesystem:username exception.
-
(make-directory path)
creates a new directory with the pathname path.
If the directory is created successfully, void is returned, otherwise
the exn:i/o:filesystem:directory exception is raised.
-
(delete-directory path)
deletes an existing directory with the pathname path.
If the directory is created successfully, void is returned, otherwise
the exn:i/o:filesystem:directory exception is raised.
-
(rename-file-or-directory old new), as
described in the previous section, renames directories.
-
(file-or-directory-modify-seconds path),
as described in the previous section, gets directory dates.
-
(file-or-directory-permissions path),
as described in the previous section, gets directory permissions.
-
(directory-list [path])
returns a list of all files and directories in the directory
specified by path. If path is omitted, a list of
files and directories in the current directory is returned.
-
(filesystem-root-list)
returns a list of all current root directories.
PLT