Interface Files


  • public interface Files
    Provides standard access to the filesystem, classpath, Android app storage (internal and external), and Android assets directory.
    • Method Detail

      • getFileHandle

        FileHandle getFileHandle​(java.lang.String path,
                                 Files.FileType type)
        Returns a handle representing a file or directory.
        Parameters:
        type - Determines how the path is resolved.
        Throws:
        GdxRuntimeException - if the type is classpath or internal and the file does not exist.
        See Also:
        Files.FileType
      • getExternalStoragePath

        java.lang.String getExternalStoragePath()
        Returns the external storage path directory. This is the app external storage on Android and the home directory of the current user on the desktop.
      • isExternalStorageAvailable

        boolean isExternalStorageAvailable()
        Returns true if the external storage is ready for file IO.
      • getLocalStoragePath

        java.lang.String getLocalStoragePath()
        Returns the local storage path directory. This is the private files directory on Android and the directory of the jar on the desktop.
      • isLocalStorageAvailable

        boolean isLocalStorageAvailable()
        Returns true if the local storage is ready for file IO.