Skip to content
Snippets Groups Projects
Commit 86ce3d51 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Add canWrite(Uri uri) util method

parent 84399175
No related branches found
No related tags found
No related merge requests found
......@@ -235,6 +235,17 @@ public class FileUtils {
});
}
public static boolean canWrite(Uri uri){
if (uri == null)
return false;
if (TextUtils.equals("file", uri.getScheme()))
return canWrite(uri.toString());
if (TextUtils.equals("content", uri.getScheme()))
return canWrite(getPathFromURI(uri));
return false;
}
public static boolean canWrite(String path){
if (path == null)
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment