Class AndroidFiles

java.lang.Object
arc.backend.android.AndroidFiles
All Implemented Interfaces:
Files

public class AndroidFiles extends Object implements Files
  • Field Details

    • sdcard

      protected final String sdcard
    • localpath

      protected final String localpath
    • assets

      protected final android.content.res.AssetManager assets
  • Constructor Details

    • AndroidFiles

      public AndroidFiles(android.content.res.AssetManager assets, String localpath)
  • Method Details

    • get

      public Fi get(String path, Files.FileType type)
      Description copied from interface: Files
      Returns a handle representing a file or directory.
      Specified by:
      get in interface Files
      type - Determines how the path is resolved.
      See Also:
    • getCachePath

      public String getCachePath()
      Specified by:
      getCachePath in interface Files
      Returns:
      absolute path to cache directory.
    • getExternalStoragePath

      public String getExternalStoragePath()
      Specified by:
      getExternalStoragePath in interface Files
      Returns:
      the external storage path directory. This is the SD card on Android and the home directory of the current user on the desktop.
    • isExternalStorageAvailable

      public boolean isExternalStorageAvailable()
      Specified by:
      isExternalStorageAvailable in interface Files
      Returns:
      true if the external storage is ready for file IO. Eg, on Android, the SD card is not available when mounted for use with a PC.
    • getLocalStoragePath

      public String getLocalStoragePath()
      Specified by:
      getLocalStoragePath in interface Files
      Returns:
      the local storage path directory. This is the private files directory on Android and the directory of the jar on the desktop.
    • isLocalStorageAvailable

      public boolean isLocalStorageAvailable()
      Specified by:
      isLocalStorageAvailable in interface Files
      Returns:
      true if the local storage is ready for file IO.