Mallet Engine  2
Entity-Component based game engine, written in Java.
 All Classes Namespaces Files Functions Variables
Classes | Public Member Functions | Static Public Member Functions
com.linxonline.mallet.io.filesystem.DesktopFileSystem Class Reference
Inheritance diagram for com.linxonline.mallet.io.filesystem.DesktopFileSystem:
Inheritance graph
[legend]
Collaboration diagram for com.linxonline.mallet.io.filesystem.DesktopFileSystem:
Collaboration graph
[legend]

List of all members.

Classes

class  DataFile

Public Member Functions

 DesktopFileSystem ()
void scanBaseDirectory ()
byte[] getResourceRaw (final String _file)
String getResourceAsString (final String _file)
boolean getResourceRaw (final String _file, final ResourceCallback _callback)
boolean getResourceAsString (final String _file, final ResourceCallback _callback)
boolean writeResourceAsString (final String _file, final String _data)
boolean writeResourceRaw (final String _file, final byte[] _data)
boolean doesResourceExist (final String _file)
boolean deleteResource (final String _file)

Static Public Member Functions

static String getExtension (final File _file)
static boolean isZipFile (final File _file)

Constructor & Destructor Documentation


Member Function Documentation

static String com.linxonline.mallet.io.filesystem.DesktopFileSystem.getExtension ( final File  _file) [static]

TODO: Needs to be improved to handle random '.' locations.

Return a byte array of the specified file. If _file hasn't been mapped, then it will be mapped, before loading the bytes.

Implements com.linxonline.mallet.io.filesystem.FileSystem.

boolean com.linxonline.mallet.io.filesystem.DesktopFileSystem.getResourceRaw ( final String  _file,
final ResourceCallback  _callback 
)

Doesn't block calling Thread, when resource has started reading, it'll call ResourceCallback. Return boolean informs whether it successfully started reading.

Implements com.linxonline.mallet.io.filesystem.FileSystem.

static boolean com.linxonline.mallet.io.filesystem.DesktopFileSystem.isZipFile ( final File  _file) [static]

Scans the ROOT_DIRECTORY directory and maps it to the HashMap. Supports Zip files & uncompressed files located within the ROOT_DIRECTORY.

Implements com.linxonline.mallet.io.filesystem.FileSystem.

boolean com.linxonline.mallet.io.filesystem.DesktopFileSystem.writeResourceAsString ( final String  _file,
final String  _data 
)

Blocks calling Thread

Implements com.linxonline.mallet.io.filesystem.FileSystem.

boolean com.linxonline.mallet.io.filesystem.DesktopFileSystem.writeResourceRaw ( final String  _file,
final byte[]  _data 
)

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables