1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Apply changes requested in PR

This commit is contained in:
davigonz 2019-09-02 10:02:47 +02:00
parent bcc5a06335
commit 234add959a

View File

@ -26,19 +26,10 @@ package com.owncloud.android.lib.resources.files;
import timber.log.Timber; import timber.log.Timber;
import java.io.File;
public class FileUtils { public class FileUtils {
public static final String PATH_SEPARATOR = "/"; public static final String PATH_SEPARATOR = "/";
public static final String FINAL_CHUNKS_FILE = ".file"; public static final String FINAL_CHUNKS_FILE = ".file";
public static String getParentPath(String remotePath) {
String parentPath = new File(remotePath).getParent();
parentPath = parentPath.endsWith(PATH_SEPARATOR) ? parentPath : parentPath + PATH_SEPARATOR;
return parentPath;
}
/** /**
* Validate the fileName to detect if contains any forbidden character: / , \ , < , > , * Validate the fileName to detect if contains any forbidden character: / , \ , < , > ,
* : , " , | , ? , * * : , " , | , ? , *