Package com.castlabs.android.utils

# Class AssetsUtils

java.lang.Object
com.castlabs.android.utils.AssetsUtils

public class AssetsUtils extends Object
Asset utilities that help to copy assets from the application to a local folder.

Since:
  2.0.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `copyAsset(Context ctx, String assetName, File target)`
  Copy an asset with the given asset name to the given target
  `static void`
  `copyAssetToExternalFilesDir(Context ctx, String assetName)`
  Copy the asset with the given asset name to the external storage directory of the current app.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### copyAssetToExternalFilesDir

    public static void copyAssetToExternalFilesDir(Context ctx, String assetName)
    Copy the asset with the given asset name to the external storage directory of the current app.

    Note that the API needs WRITE_EXTERNAL_STORAGE permission which should be added and handled by the caller
    Parameters:
      `ctx` - the context
      `assetName` - the asset name

  - ### copyAsset

    public static void copyAsset(Context ctx, String assetName, File target)
    Copy an asset with the given asset name to the given target
    Parameters:
      `ctx` - the context
      `assetName` - the asset name
      `target` - the target