rmdir - Maple Help

rmdir

removes a directory

 Calling Sequence rmdir(dirName)

Parameters

 dirName - name of the directory to remove

Description

 • The rmdir function removes a directory from the file system of the underlying operating system.
 • The dirName argument, which must be a Maple string or symbol, specifies the path name of the directory to remove.
 • The set of characters that are permitted in directory names is system dependent. Likewise, the character used to separate the components of a directory is system dependent. If the backslash character is to appear in the string, it must be doubled up, because Maple strings use the backslash character as an escape character.
 • If successful, rmdir will return NULL (that is, nothing). If unsuccessful, an exception will be raised.

Examples

 > $\mathrm{mkdir}\left("mydir"\right)$
 > $\mathrm{mkdir}\left("mydir/subdir"\right)$
 > $\mathrm{oldDir}≔\mathrm{currentdir}\left("mydir/subdir"\right)$
 ${"/u/joeuser/work"}$ (1)
 > $\mathrm{currentdir}\left(\right)$
 ${"/u/joeuser/work/mydir/subdir"}$ (2)
 > $\mathrm{currentdir}\left(\mathrm{oldDir}\right)$
 ${"/u/joeuser/work/mydir/subdir"}$ (3)
 > $\mathrm{rmdir}\left("mydir"\right)$

 Error, (in rmdir) directory exists and is not empty

 > $\mathrm{rmdir}\left("mydir/subdir"\right)$
 > $\mathrm{rmdir}\left("mydir"\right)$