Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: mkpathChapter 8
Standard Modules
Next: 8.74 File::Path
 

rmtree

rmtree (root, prt, skip)

Deletes subtrees from the directory structure, returning the number of files successfully deleted. Symbolic links are treated as ordinary files. Takes the following arguments:

root

Root of the subtree to delete or reference to a list of roots. The roots, and all files and directories below each root, are deleted.

prt

Boolean. If true, rmtree prints a message for each file, with the name of the file and whether it's using rmdir or unlink to remove it (or if it's skipping the file). Default is false.

skip

Boolean. If true, rmtree skips any files to which you do not have delete access (under VMS) or write access (under other operating systems). Default is false.


Previous: Reference: mkpathPerl in a NutshellNext: 8.74 File::Path
Reference: mkpathBook Index8.74 File::Path