com.metaio.tools.io
Class AssetsManager
java.lang.Object
com.metaio.tools.io.AssetsManager
public final class AssetsManager
- extends Object
Method Summary |
static void |
extractAllAssets(Context context,
boolean override)
Extract all assets to internal memory |
static void |
extractAllAssets(Context context,
String parentPath,
boolean override)
Extract all assets to internal memory |
static String |
getAssetPath(String filename)
Get extracted asset file path. |
AssetsManager
public AssetsManager()
extractAllAssets
public static void extractAllAssets(Context context,
boolean override)
throws IOException
- Extract all assets to internal memory
- Parameters:
context
- Application contextoverride
- override existing files
- Throws:
IOException
extractAllAssets
public static void extractAllAssets(Context context,
String parentPath,
boolean override)
throws IOException
- Extract all assets to internal memory
- Parameters:
context
- Application contextparentPath
- Parent path of the directory which should be extracted,
pass empty string to extract all assetsoverride
- override existing files
- Throws:
IOException
getAssetPath
public static String getAssetPath(String filename)
- Get extracted asset file path.
- Parameters:
filename
- file or directory name
- Returns:
- File path or null if does not exists or assets are not extracted