com.eveningoutpost.dexdrip.utils.FileUtils Java Examples
The following examples show how to use
com.eveningoutpost.dexdrip.utils.FileUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ImportDatabaseActivity.java From xDrip-Experimental with GNU General Public License v3.0 | 6 votes |
private boolean findAllDatabases() { databases = new ArrayList<>(); File file = new File(FileUtils.getExternalDir(getApplicationContext())); if (!FileUtils.makeSureDirectoryExists(file.getAbsolutePath())) { return false; } // add from "root" addAllDatabases(file, databases); // add from level below (Andriod usually unzips to a subdirectory) File[] subdirectories = file.listFiles(new FileFilter() { @Override public boolean accept(File path) { return path.isDirectory(); } }); for (File subdirectory : subdirectories) { addAllDatabases(subdirectory, databases); } return true; }
Example #2
Source File: ImportDatabaseActivity.java From xDrip with GNU General Public License v3.0 | 5 votes |
private boolean findAllDatabases() { databases = new ArrayList<>(); File file = new File(FileUtils.getExternalDir()); if (!FileUtils.makeSureDirectoryExists(file.getAbsolutePath())) { return false; } // add from "root" addAllDatabases(file, databases); // add from level below (Andriod usually unzips to a subdirectory) File[] subdirectories = file.listFiles(new FileFilter() { @Override public boolean accept(File path) { return path.isDirectory(); } }); try { for (File subdirectory : subdirectories) { addAllDatabases(subdirectory, databases); } } catch (NullPointerException e) { // nothing found } return true; }
Example #3
Source File: ImportDatabaseActivity.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
private boolean findAllDatabases() { databases = new ArrayList<>(); File file = new File(FileUtils.getExternalDir()); if (!FileUtils.makeSureDirectoryExists(file.getAbsolutePath())) { return false; } // add from "root" addAllDatabases(file, databases); // add from level below (Andriod usually unzips to a subdirectory) File[] subdirectories = file.listFiles(new FileFilter() { @Override public boolean accept(File path) { return path.isDirectory(); } }); try { for (File subdirectory : subdirectories) { addAllDatabases(subdirectory, databases); } } catch (NullPointerException e) { // nothing found } return true; }