Next: , Previous: , Up: Files   [Contents][Index]


5.26.5 Manipulating Directories

Command: make-directory directory-name

Create a new directory called directory-name.

Command: delete-directory directory-name

Delete the directory called directory-name. This only succeeds if the directory in question is empty, otherwise an error is signalled.

Function: directory-files directory-name

Returns a list of the names of all items in the directory whose name is directory-name. The names in the list will be relative to the directory directory-name.

(directory-files "/tmp/foo"
    ⇒ ("bar" "subdir" "xyz" "." "..")