dir.remove: Remove directories that are not empty.

Description Usage Arguments Value Author(s)

Description

Unlike file.remove which only removes files or empty directories, this one will recursively delete a directory.

Usage

1

Arguments

d

a path to a directory (or a file)

debug

logical: print helpful messages?

Value

TRUE or FALSE based on success. the directory will be deleted. If FALSE, you will probably get a message like this:
[1] FALSE Warning message: In file.remove("blah", recursive = TRUE) : cannot remove file 'blah', reason 'Directory not empty'
This probably means that you have hidden files somewhere which prevent the directory from being deleted. Warnings: if you have any hidden files, then this code will break. e.g. “.DS_Store” or “._xyz” files.

Author(s)

Mark Cowley, 2009-10-15


drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.