Remove a Directory

DESCRIPTION:

Remove directories and their contents from the file system.

USAGE:

rmdir(dir, recursive=T) 

REQUIRED ARGUMENTS:

dir
the names of directories to remove.

OPTIONAL ARGUMENTS:

recursive
if TRUE remove the contents of the directory, otherwise do not remove the directory if it contains any files.

VALUE:

a logical vector the length of the dir argument; TRUE means the directory was removed. The error attribute contains a short description of why it could not be removed.

SIDE EFFECTS:

The directories are removed.

WARNING:

The directories are removed without any further questions.

SEE ALSO:

, , , .

EXAMPLES:

# Make a directory in which to store some graphics files 
# and remove it after you are done viewing them. 
mkdir("pdf.dir") 
for(i in 1:5) { 
    pdf.graph(file=paste("pdf.dir/",i,".pdf", sep="")) 
    qqnorm(runif(30)) ; dev.off() } 
# ... look at pdf files with pdf viewer, copy good ones from there ... 
rmdir("pdf.dir")