Most Emacs Lisp file-manipulation functions get errors when used on
files that are directories. For example, you cannot delete a directory
with delete-file. These special functions exist to create and
delete directories.
This command creates a directory named dirname. If parents is non-
nil, as is always the case in an interactive call, that means to create the parent directories first, if they don't already exist.
mkdiris an alias for this.
This command copies the directory named dirname to newname. If newname names an existing directory, dirname will be copied to a subdirectory there.
It always sets the file modes of the copied files to match the corresponding original file.
The third arg keep-time non-
nilmeans to preserve the modification time of the copied files. A prefix arg makes keep-time non-nil.Noninteractively, the last argument parents says whether to create parent directories if they don't exist. Interactively, this happens by default.
This command deletes the directory named dirname. The function
delete-filedoes not work for files that are directories; you must usedelete-directoryfor them. If recursive isnil, and the directory contains any files,delete-directorysignals an error.
delete-directoryonly follows symbolic links at the level of parent directories.