www.delorie.com/gnu/docs/elisp-manual-21/elisp_402.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

25.10 Creating and Deleting Directories

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.

Function: make-directory dirname &optional parents
This function creates a directory named dirname. If parents is non-nil, that means to create the parent directories first, if they don't already exist.

Function: delete-directory dirname
This function deletes the directory named dirname. The function delete-file does not work for files that are directories; you must use delete-directory for them. If the directory contains any files, delete-directory signals an error.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003