Revert all commits related to ContentSettingsFragment
Revert "Annotate methode parameters as NonNull" This reverts commitaf92c3ed4f. Revert "Commit path immediately when import backup" This reverts commitc3d9c4bb3f. Revert "Set ImportExportDataPath only on successful import" This reverts commita4bc61a7d0. Revert "Set ImportExportDataPath only on successful export" This reverts commit372d7a7832. Revert "Invert if condition in ContentSettingsFragment.setImportExportDataPath for better readability" This reverts commit2877c43ecb. Revert "Move ContentSettingsFragment.isValidPath to helpers and add unit test for it." This reverts commit15873d53c4. Revert "Save backup import/export location for feature import/exports" This reverts commit01f05e2f46. Remove FilePathHelperTest file
This commit is contained in:
parent
dd73d82e56
commit
84709eb620
4 changed files with 16 additions and 151 deletions
|
|
@ -1,22 +0,0 @@
|
|||
package org.schabi.newpipe.util;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public final class FilePathUtils {
|
||||
private FilePathUtils() { }
|
||||
|
||||
|
||||
/**
|
||||
* Check that the path is a valid directory path and it exists.
|
||||
*
|
||||
* @param path full path of directory,
|
||||
* @return is path valid or not
|
||||
*/
|
||||
public static boolean isValidDirectoryPath(final String path) {
|
||||
if (path == null || path.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
final File file = new File(path);
|
||||
return file.exists() && file.isDirectory();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue