Learn R Programming

icesTAF (version 3.6.0)

rmdir: Remove Empty Directory

Description

Remove empty directory under any operating system.

Usage

rmdir(path, recursive = FALSE)

Value

TRUE for success, FALSE for failure, invisibly.

Arguments

path

a directory name.

recursive

whether to remove empty subdirectories as well.

See Also

unlink with recursive = TRUE removes non-empty directories.

mkdir creates a new directory.

clean can be used to remove non-empty directories.

icesTAF-package gives an overview of the package.

Examples

Run this code
if (FALSE) {
mkdir("emptydir")
rmdir("emptydir")

mkdir("outer/inner")
rmdir("outer", recursive=TRUE)
}

Run the code above in your browser using DataLab