public class DesktopPlayerData extends PlayerData
| Constructor and Description |
|---|
DesktopPlayerData(java.lang.String gameIdentifier) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureDataDirectoryExists()
Internal method for setting up the save data directory (if required)
|
java.lang.String |
getSaveDirectoryForGame(java.lang.String gameIdentifier) |
boolean |
isDataStorageConnected()
Returns if the player data storage is connected
|
boolean |
isDataStorageFull()
Returns if the player data storage is full
|
protected FileHandle |
resolve(java.lang.String[] filepath)
Returns a
FileHandle for a file or directory within the save data directory |
protected FileHandle |
resolveTmp(java.lang.String[] filepath)
Returns a
FileHandle for a temporary file or directory within the save data directory |
void |
wipe()
Wipes all data within the game data location
|
createDirectory, delete, ensureDirectoryExistsForFile, getFileHandle, hasDirectory, hasFile, readBytes, readJson, readString, readXml, writeBytes, writeJson, writeString, writeXmlprotected FileHandle resolve(java.lang.String[] filepath)
PlayerDataFileHandle for a file or directory within the save data directoryresolve in class PlayerDatafilepath - The path broken up by directory/fileFileHandle instanceprotected FileHandle resolveTmp(java.lang.String[] filepath)
PlayerDataFileHandle for a temporary file or directory within the save data directoryresolveTmp in class PlayerDatafilepath - The path broken up by directory/fileFileHandle instanceprotected void ensureDataDirectoryExists()
throws java.io.IOException
PlayerDataensureDataDirectoryExists in class PlayerDatajava.io.IOExceptionpublic boolean isDataStorageFull()
throws java.lang.Exception
PlayerDataisDataStorageFull in class PlayerDatajava.lang.Exception - Thrown if storage cannot be accessedpublic boolean isDataStorageConnected()
PlayerDataisDataStorageConnected in class PlayerDatapublic void wipe()
throws PlayerDataException
PlayerDatawipe in class PlayerDataPlayerDataException - Thrown if the game data location cannot be accessed or the
data could not be wipedpublic java.lang.String getSaveDirectoryForGame(java.lang.String gameIdentifier)