Class ZomboidFileSystem
java.lang.Object
zombie.ZomboidFileSystem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static final class
static final class
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
static boolean
deleteDirectory
(String string) boolean
deleteFile
(String filePath) static boolean
ensureFolderExists
(File directory) static boolean
ensureFolderExists
(String path) getAbsolutePath
(String rel) void
getAllModFolders
(List<String> out) Object[]
Object[]
getAllPathsContaining
(String str, String str2) getAnimName
(URI mediaURI, File file) Returns the root cache folder.getCacheDirSub
(String subPath) Returns the subPath, relative to the CacheDir path.getCanonicalFile
(File file) getCanonicalFile
(File file0, String string) getCanonicalFile
(String path) getCanonicalPath
(File file) getCanonicalPath
(String path) getCanonicalURI
(String path) static String
getDateStampString
(Date date) static String
getDateTimeStampString
(Date date) static String
getDirectoryString
(String string1) getFileInCurrentSave
(String fileName) getFileInCurrentSave
(String subDir, String fileName) getFileInCurrentSave
(String subDir1, String subDir2, String fileName) getFileNameInCurrentSave
(String fileName) getFileNameInCurrentSave
(String subDir, String fileName) getFileNameInCurrentSave
(String subDir1, String subDir2, String fileName) getFilePathFromGuid
(String guid) getGameVersionIntFromName
(String string) getGuidFromFilePath
(String path) void
getLocalWorkDirSub
(String subPath) getMediaFile
(String subPath) getMediaPath
(String subPath) Returns the messaging folder.getMessagingDirSub
(String subPath) Returns the messaging folder.getModInfoForDir
(String modDir) getModVersionFile
(String string) getRelativeFile
(File file) getRelativeFile
(String string) getRelativeFile
(URI root, File file) getRelativeFile
(URI root, String string) getSaveDirSub
(String subPath) Returns the subPath, relative to the SaveDir path.getScreenshotDirSub
(String subPath) Returns the subPath, relative to the ScreenshotDir path.void
static String
static String
getTimeStampString
(Date date, SimpleDateFormat simpleDateFormat) static String
getTimeStampStringNow
(SimpleDateFormat simpleDateFormat) getWorkshopItemMods
(long itemID) void
init()
boolean
isKnownFile
(String string0) boolean
isValidFilePathGuid
(String source) static File[]
listAllDirectories
(File root, FileFilter filter, boolean recursive) static File[]
listAllDirectories
(String rootPath, FileFilter filter, boolean recursive) static File[]
listAllFiles
(File file) static File[]
listAllFiles
(File folder, FileFilter filter, boolean recursive) static File[]
listAllFiles
(String folderPath, FileFilter filter, boolean recursive) void
void
void
void
void
loadModsAux
(ArrayList<String> toLoad, ArrayList<String> ordered) void
void
normalizeFolderPath
(String path) static String
processFilePath
(String filePath, char separatorChar) void
Reset()
void
resetDefaultModsForNewRelease
(String versionStr) void
String[]
resolveAllDirectories
(String relPath, FileFilter filter, boolean recursive) String[]
resolveAllFiles
(String relPath, FileFilter filter, boolean recursive) resolveFileOrGUID
(String source) Takes a string source, which is either a GUID or a file path.resolveRelativePath
(String srcFilePath, String relativePath) void
void
searchFolders
(File fo) searchForModInfo
(File path, String modSearched, ArrayList<ChooseGameInfo.Mod> _mods) void
setCacheDir
(String dir) Specify root cache folder.void
void
setModIdToDir
(String string0, String string1) boolean
tryDeleteFile
(String filePath) void
update()
void
walkGameAndModFiles
(String relPath, boolean recursive, ZomboidFileSystem.IWalkFilesVisitor consumer)
-
Field Details
-
instance
-
ActiveFileMap
-
base
-
IgnoreActiveFileMap
-
-
Method Details
-
init
- Throws:
IOException
-
getCanonicalFile
-
getGameModeCacheDir
-
getCurrentSaveDir
-
getFileNameInCurrentSave
-
getFileNameInCurrentSave
-
getFileNameInCurrentSave
-
getFileInCurrentSave
-
getFileInCurrentSave
-
getFileInCurrentSave
-
getSaveDir
-
getSaveDirSub
-
getScreenshotDir
-
getScreenshotDirSub
-
setCacheDir
Specify root cache folder. Used for all save/settings/etc. files in the user directory. If the specified folder does not exist, is created on the spot. -
getCacheDir
Returns the root cache folder. Used for all save/settings/etc. files in the user directory. The returned folder exists on arrival. -
getCacheDirSub
-
getMessagingDir
Returns the messaging folder. Used for writing Trigger files for communicating with the game. The returned folder exists on arrival. -
getMessagingDirSub
-
getMediaLowercaseURI
-
getMediaRootFile
-
getMediaRootPath
-
getMediaFile
-
getMediaPath
-
getAbsoluteWorkDir
-
getLocalWorkDir
-
getLocalWorkDirSub
-
getAnimsXFile
-
getAnimSetsPath
-
getActionGroupsPath
-
ensureFolderExists
-
ensureFolderExists
-
searchFolders
-
getAllPathsContaining
-
getAllPathsContaining
-
getString
-
getDirectoryString
-
isKnownFile
-
getAbsolutePath
-
Reset
public void Reset() -
getCanonicalFile
-
getCanonicalFile
-
getCanonicalPath
-
getCanonicalPath
-
getCanonicalURI
-
resetModFolders
public void resetModFolders() -
getInstalledItemModsFolders
-
getStagedItemModsFolders
-
setModFoldersOrder
-
getAllModFolders
-
getModVersionFile
-
getGameVersionIntFromName
-
getWorkshopItemMods
-
setModIdToDir
-
searchForModInfo
public ChooseGameInfo.Mod searchForModInfo(File path, String modSearched, ArrayList<ChooseGameInfo.Mod> _mods) -
loadMod
-
loadMods
-
loadModsAux
-
loadMods
-
getModIDs
-
getModDir
-
getModInfoForDir
-
isModded
-
getRelativeFile
-
getRelativeFile
-
getRelativeFile
-
getRelativeFile
-
getAnimName
-
resolveRelativePath
-
saveModsFile
public void saveModsFile() -
loadModPackFiles
public void loadModPackFiles() -
loadModTileDefs
public void loadModTileDefs() -
loadModTileDefPropertyStrings
public void loadModTileDefPropertyStrings() -
loadFileGuidTable
public void loadFileGuidTable() -
getFileGuidTable
-
getFilePathFromGuid
-
getGuidFromFilePath
-
resolveFileOrGUID
-
isValidFilePathGuid
-
listAllDirectories
-
listAllDirectories
-
listAllFiles
-
listAllFiles
-
listAllFiles
-
walkGameAndModFiles
public void walkGameAndModFiles(String relPath, boolean recursive, ZomboidFileSystem.IWalkFilesVisitor consumer) -
resolveAllDirectories
-
resolveAllFiles
-
normalizeFolderPath
-
processFilePath
-
tryDeleteFile
-
deleteDirectory
-
deleteFile
- Throws:
IOException
-
update
public void update() -
cleanMultiplayerSaves
public void cleanMultiplayerSaves() -
resetDefaultModsForNewRelease
-
getStartupTimeStamp
-
getDateTimeStampStringNow
-
getDateTimeStampString
-
getDateStampString
-
getTimeStampString
-
getTimeStampStringNow
-