程序包 net_62v.external

类 MetaStorageManager

java.lang.Object
net_62v.external.MetaStorageManager

public final class MetaStorageManager extends Object
Mundo storage manager, you can use the storage related api by using this class.
版本:
1.2
作者:
king@62v.net
另请参阅:
  • 构造器详细资料

    • MetaStorageManager

      public MetaStorageManager()
  • 方法详细资料

    • obtainAppDataDir

      public static File obtainAppDataDir(String packageName, String splitRegion)
      Get the application data dir
      You must specific the package name and user name.
      参数:
      packageName - package name of the app
      splitRegion - user name
      返回:
      data dir
      另请参阅:
    • obtainAppDataDir

      public static File obtainAppDataDir(String packageName, int splitRegion)
      Alias of the function obtainAppDataDir
      参数:
      packageName - package name
      splitRegion - user name
      返回:
      data dir
      另请参阅:
    • obtainAppExternalStorageDir

      public static String obtainAppExternalStorageDir(String appPkg) throws RemoteException
      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

      @Deprecated public static boolean setExternalRootDirectory(String newRoot) throws RemoteException
      已过时。
      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 writeable File.canWrite().
      返回:
      If the changes be applied successfully then true, otherwise false
      抛出:
      RemoteException
      从以下版本开始:
      1.2
      另请参阅: