@Singleton public class FileSystemPathResolverImpl extends Object
Constructor and Description |
---|
FileSystemPathResolverImpl(Context context,
AccountManagerServiceImpl accountManagerService,
FileSystemHashGenerator hashGenerator) |
Modifier and Type | Method and Description |
---|---|
Uri |
getJavaScriptPath(Uri nativePath)
Converts a native path URL to a JavaScript File API path URI.
|
Uri |
getNativeCacheSharedPath()
Returns root for shared cache for web application.
|
List<Uri> |
getNativeCompleteMultiUserRootsForWebApp(String appId)
Returns a list of complete roots for files shared between users for given application.
|
List<Uri> |
getNativeCompleteUserRootsForWebApp(String appId)
Returns a list of complete roots for currently opened user.
|
List<Uri> |
getNativeFileSystemRoots()
Returns list of native filesystem roots - temporary and persistent.
|
List<Uri> |
getNativeFileSystemUserRoots(String userIdentifier)
Returns list of native filesystem roots for specified user.
|
Uri |
getNativePath(Uri jsPath)
Converts a JavaScript File API URL path to a native path URL.
|
Uri |
getNativeRootPath(String jsRootType,
String appIdentifier)
Returns a native path for a specified JS root type and given application.
|
Uri |
getNativeRootPath(Uri nativePath)
Returns a native root path for a specified native path.
|
List<Uri> |
getNativeWebAppsRoots(String appId)
Returns a list of roots for given web application.
|
protected String |
getScheme() |
static boolean |
isJsPath(Uri jsPath)
Checks if the given path starts with JS-specific schemes.
|
boolean |
isPathExternal(Uri jsPath)
Returns whether the jsPath refers to external storage on the device
|
@Inject public FileSystemPathResolverImpl(Context context, AccountManagerServiceImpl accountManagerService, FileSystemHashGenerator hashGenerator)
public Uri getNativeRootPath(String jsRootType, String appIdentifier) throws Exception
jsRootType
- On of the js root types defined in the class description.appIdentifier
- Web application identifier.Exception
public Uri getNativeRootPath(Uri nativePath) throws Exception
nativePath
- A native URI to be converted.Exception
public Uri getNativePath(Uri jsPath) throws Exception
jsPath
- A JavaScript File API URI to be converted.Exception
public Uri getJavaScriptPath(Uri nativePath) throws Exception
nativePath
- A native URI to be converted.Exception
protected String getScheme()
public List<Uri> getNativeFileSystemRoots()
public List<Uri> getNativeFileSystemUserRoots(String userIdentifier)
public List<Uri> getNativeCompleteUserRootsForWebApp(String appId)
public List<Uri> getNativeCompleteMultiUserRootsForWebApp(String appId)
public List<Uri> getNativeWebAppsRoots(String appId)
public Uri getNativeCacheSharedPath()
public boolean isPathExternal(Uri jsPath)
public static boolean isJsPath(Uri jsPath)
jsPath
-