程序包 net_62v.external
类 MetaStorageManager
java.lang.Object
net_62v.external.MetaStorageManager
Mundo storage manager, you can use the storage related api by using this class.
- 版本:
- 1.2
- 作者:
- [email protected]
- 另请参阅:
-
构造器概要
-
方法概要
修饰符和类型方法说明static File
obtainAppDataDir
(String packageName, int splitRegion) Alias of the function obtainAppDataDirstatic File
obtainAppDataDir
(String packageName, String splitRegion) Get the application data dir
You must specific the package name and user name.static String
obtainAppExternalStorageDir
(String appPkg) Obtain an external relative (not absolutely path) path by package name
The path will mostly like to be /storage/emulated/0/Android/obb/[Your Package Name]/scopedStorage/[appPkg]static boolean
setExternalRootDirectory
(String newRoot) 已过时。Please use the default configuration to evade the read and write issues above Android 11.
-
构造器详细资料
-
MetaStorageManager
public MetaStorageManager()
-
-
方法详细资料
-
obtainAppDataDir
Get the application data dir
You must specific the package name and user name.- 参数:
packageName
- package name of the appsplitRegion
- user name- 返回:
- data dir
- 另请参阅:
-
obtainAppDataDir
Alias of the function obtainAppDataDir- 参数:
packageName
- package namesplitRegion
- user name- 返回:
- data dir
- 另请参阅:
-
obtainAppExternalStorageDir
Obtain an external relative (not absolutely path) path by package name
The path will mostly like to be /storage/emulated/0/Android/obb/[Your Package Name]/scopedStorage/[appPkg]- 参数:
appPkg
- package name- 返回:
- A relative path, please do not hardcode the external path.
- 抛出:
RemoteException
- 另请参阅:
-
setExternalRootDirectory
已过时。Please use the default configuration to evade the read and write issues above Android 11.Set the external directory root, and the external file structures will be [Your new external storage root dir]/[appPkg]
If you change this path manually after an app upgrade, you must delete or move the origin dir manually.
You must call this function before you launch the app, the application that already launched will continue to use the old path.- 参数:
newRoot
- New external storage root directory, which must be writeableFile.canWrite()
.- 返回:
- If the changes be applied successfully then true, otherwise false
- 抛出:
RemoteException
- 从以下版本开始:
- 1.2
- 另请参阅:
-