Java com.badlogic.gdx.files FileHandle fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.files FileHandle fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.files FileHandle.

The text is from its open source code.

Subclass

com.badlogic.gdx.files.FileHandle has subclasses.
Click this link to see all its subclasses.

Field

Filefile
FileTypetype

Constructor

FileHandle(String fileName)
Creates a new absolute FileHandle for the file name.
FileHandle(File file)
Creates a new absolute FileHandle for the File .

Method

FileHandlechild(String name)
Returns a handle to the child with the specified name.
voidcopyTo(FileHandle dest)
Copies this file or directory to the specified file or directory.
booleandelete()
Deletes this file or empty directory and returns success.
booleandeleteDirectory()
Deletes this file or directory and all children, recursively.
voidemptyDirectory()
Deletes all children of this directory, recursively.
booleanequals(Object obj)
booleanexists()
Returns true if the file exists.
Stringextension()
booleanisDirectory()
Returns true if this file is a directory.
longlastModified()
Returns the last modified time in milliseconds for this file.
longlength()
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.
voidmkdirs()
voidmoveTo(FileHandle dest)
Moves this file to the specified file, overwriting the file if it already exists.
Stringname()
StringnameWithoutExtension()
FileHandleparent()
Stringpath()
StringpathWithoutExtension()
InputStreamread()
Returns a stream for reading this file as bytes.
BufferedInputStreamread(int bufferSize)
Returns a buffered stream for reading this file as bytes.
byte[]readBytes()
Reads the entire file into a byte array.
Readerreader(String charset)
Returns a reader for reading this file as characters.
BufferedReaderreader(int bufferSize)
Returns a buffered reader for reading this file as characters.
BufferedReaderreader(int bufferSize, String charset)
Returns a buffered reader for reading this file as characters.
Readerreader()
Returns a reader for reading this file as characters.
StringreadString()
Reads the entire file into a string using the platform's default charset.
StringreadString(String charset)
Reads the entire file into a string using the specified charset.
FileHandlesibling(String name)
Returns a handle to the sibling with the specified name.
StringtoString()
OutputStreamwrite(boolean append)
Returns a stream for writing to this file.
OutputStreamwrite(boolean append, int bufferSize)
Returns a buffered stream for writing to this file.
voidwrite(InputStream input, boolean append)
Reads the remaining bytes from the specified stream and writes them to this file.
voidwriteBytes(byte[] bytes, boolean append)
Writes the specified bytes to the file.
Writerwriter(boolean append)
Returns a writer for writing to this file using the default charset.
Writerwriter(boolean append, String charset)
Returns a writer for writing to this file.
voidwriteString(String string, boolean append)
Writes the specified string to the file using the default charset.
voidwriteString(String string, boolean append, String charset)
Writes the specified string to the file as UTF-8.