public interface Files
Modifier and Type | Interface and Description |
---|---|
static class |
Files.FileType
Indicates how to resolve a path to a file.
|
Modifier and Type | Method and Description |
---|---|
FileHandle |
absolute(String path)
Convenience method that returns a
Files.FileType.Absolute file handle. |
FileHandle |
classpath(String path)
Convenience method that returns a
Files.FileType.Classpath file handle. |
FileHandle |
external(String path)
Convenience method that returns a
Files.FileType.External file handle. |
String |
getExternalStoragePath()
Returns the external storage path directory.
|
FileHandle |
getFileHandle(String path,
Files.FileType type)
Returns a handle representing a file or directory.
|
String |
getLocalStoragePath()
Returns the local storage path directory.
|
FileHandle |
internal(String path)
Convenience method that returns a
Files.FileType.Internal file handle. |
boolean |
isExternalStorageAvailable()
Returns true if the external storage is ready for file IO.
|
boolean |
isLocalStorageAvailable()
Returns true if the local storage is ready for file IO.
|
FileHandle |
local(String path)
Convenience method that returns a
Files.FileType.Local file handle. |
FileHandle getFileHandle(String path, Files.FileType type)
type
- Determines how the path is resolved.GdxRuntimeException
- if the type is classpath or internal and the file does not exist.Files.FileType
FileHandle classpath(String path)
Files.FileType.Classpath
file handle.FileHandle internal(String path)
Files.FileType.Internal
file handle.FileHandle external(String path)
Files.FileType.External
file handle.FileHandle absolute(String path)
Files.FileType.Absolute
file handle.FileHandle local(String path)
Files.FileType.Local
file handle.String getExternalStoragePath()
boolean isExternalStorageAvailable()
String getLocalStoragePath()
boolean isLocalStorageAvailable()
Copyright © 2015. All rights reserved.