Example usage for Java com.badlogic.gdx.files FileHandle fields, constructors, methods, implement or subclass
The text is from its open source code.
FileHandle(String fileName) Creates a new absolute FileHandle for the file name. | |
FileHandle(File file) Creates a new absolute FileHandle for the File . |
FileHandle | child(String name) Returns a handle to the child with the specified name. |
void | copyTo(FileHandle dest) Copies this file or directory to the specified file or directory. |
boolean | delete() Deletes this file or empty directory and returns success. |
boolean | deleteDirectory() Deletes this file or directory and all children, recursively. |
void | emptyDirectory() Deletes all children of this directory, recursively. |
boolean | equals(Object obj) |
boolean | exists() Returns true if the file exists. |
String | extension() |
boolean | isDirectory() Returns true if this file is a directory. |
long | lastModified() Returns the last modified time in milliseconds for this file. |
long | length() Returns the length in bytes of this file, or 0 if this file is a directory, does not exist, or the size cannot otherwise be determined. |
FileHandle[] | list() Returns the paths to the children of this directory. |
FileHandle[] | list(FileFilter filter) Returns the paths to the children of this directory that satisfy the specified filter. |
FileHandle[] | list(FilenameFilter filter) Returns the paths to the children of this directory that satisfy the specified filter. |
FileHandle[] | list(String suffix) Returns the paths to the children of this directory with the specified suffix. |
void | mkdirs() |
void | moveTo(FileHandle dest) Moves this file to the specified file, overwriting the file if it already exists. |
String | name() |
String | nameWithoutExtension() |
FileHandle | parent() |
String | path() |
String | pathWithoutExtension() |
InputStream | read() Returns a stream for reading this file as bytes. |
BufferedInputStream | read(int bufferSize) Returns a buffered stream for reading this file as bytes. |
byte[] | readBytes() Reads the entire file into a byte array. |
Reader | reader(String charset) Returns a reader for reading this file as characters. |
BufferedReader | reader(int bufferSize) Returns a buffered reader for reading this file as characters. |
BufferedReader | reader(int bufferSize, String charset) Returns a buffered reader for reading this file as characters. |
Reader | reader() Returns a reader for reading this file as characters. |
String | readString() Reads the entire file into a string using the platform's default charset. |
String | readString(String charset) Reads the entire file into a string using the specified charset. |
FileHandle | sibling(String name) Returns a handle to the sibling with the specified name. |
String | toString() |
OutputStream | write(boolean append) Returns a stream for writing to this file. |
OutputStream | write(boolean append, int bufferSize) Returns a buffered stream for writing to this file. |
void | write(InputStream input, boolean append) Reads the remaining bytes from the specified stream and writes them to this file. |
void | writeBytes(byte[] bytes, boolean append) Writes the specified bytes to the file. |
Writer | writer(boolean append) Returns a writer for writing to this file using the default charset. |
Writer | writer(boolean append, String charset) Returns a writer for writing to this file. |
void | writeString(String string, boolean append) Writes the specified string to the file using the default charset. |
void | writeString(String string, boolean append, String charset) Writes the specified string to the file as UTF-8. |