diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2015-02-11 19:01:48 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2015-02-11 19:01:48 +0100 |
| commit | eac13a5843d2e46d62b1c72aee0916aeb3030b3a (patch) | |
| tree | d15253beff8f79e9aea12e44d6e620f70ed9c099 /main/src/cgeo/geocaching/files | |
| parent | 7ec2b8696f4dac0fc27075bfb0aa5846baa87168 (diff) | |
| download | cgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.zip cgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.tar.gz cgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.tar.bz2 | |
Move deleteDirectory to FileUtils
Diffstat (limited to 'main/src/cgeo/geocaching/files')
| -rw-r--r-- | main/src/cgeo/geocaching/files/LocalStorage.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java index 7fce27d..cfeac9a 100644 --- a/main/src/cgeo/geocaching/files/LocalStorage.java +++ b/main/src/cgeo/geocaching/files/LocalStorage.java @@ -364,24 +364,6 @@ public final class LocalStorage { return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); } - public static boolean deleteDirectory(@NonNull final File dir) { - final File[] files = dir.listFiles(); - - // Although we are called on an existing directory, it might have been removed concurrently - // in the meantime, for example by the user or by another cleanup task. - if (files != null) { - for (final File file : files) { - if (file.isDirectory()) { - deleteDirectory(file); - } else { - FileUtils.delete(file); - } - } - } - - return FileUtils.delete(dir); - } - /** * Deletes all files from directory geocode with the given prefix. * |
