]> source.dussan.org Git - jgit.git/commit
Extend FileUtils.delete with option to delete empty directories only 43/10543/3
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 20 Feb 2013 21:54:59 +0000 (22:54 +0100)
committerRobin Stocker <robin@nibor.org>
Fri, 8 Mar 2013 15:26:10 +0000 (16:26 +0100)
commit08d5ede281843701ba709ef4f6f4336958f215d5
treeb1bacd169cfc60279053cfed2fb38c96cb7d2dfe
parent13ea3b0957d1621c1aea986a97f8d2ec0b37491a
Extend FileUtils.delete with option to delete empty directories only

The new option EMPTY_DIRECTORIES_ONLY will make delete() only delete
empty directories. Any attempt to delete files will fail. Can be
combined with RECURSIVE to wipe out entire tree structures and
IGNORE_ERRORS to silently ignore any files or non-empty directories.

Change-Id: Icaa9a30e5302ee5c0ba23daad11c7b93e26b7445
Signed-off-by: Robin Stocker <robin@nibor.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtilTest.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java