Package zombie

Class ZomboidFileSystem

java.lang.Object
zombie.ZomboidFileSystem

public final class ZomboidFileSystem extends Object
  • Field Details

  • Method Details

    • init

      public void init() throws IOException
      Throws:
      IOException
    • getGameModeCacheDir

      public String getGameModeCacheDir()
    • getCurrentSaveDir

      public String getCurrentSaveDir()
    • getFileNameInCurrentSave

      public String getFileNameInCurrentSave(String fileName)
    • getFileNameInCurrentSave

      public String getFileNameInCurrentSave(String subDir, String fileName)
    • getFileNameInCurrentSave

      public String getFileNameInCurrentSave(String subDir1, String subDir2, String fileName)
    • getFileInCurrentSave

      public File getFileInCurrentSave(String fileName)
    • getFileInCurrentSave

      public File getFileInCurrentSave(String subDir, String fileName)
    • getFileInCurrentSave

      public File getFileInCurrentSave(String subDir1, String subDir2, String fileName)
    • getSaveDir

      public String getSaveDir()
    • getSaveDirSub

      public String getSaveDirSub(String subPath)
      Returns the subPath, relative to the SaveDir path. NOTE: Does not create the subPath, nor ensure that it exists.
    • getScreenshotDir

      public String getScreenshotDir()
    • getScreenshotDirSub

      public String getScreenshotDirSub(String subPath)
      Returns the subPath, relative to the ScreenshotDir path. NOTE: Does not create the subPath, nor ensure that it exists.
    • setCacheDir

      public void setCacheDir(String dir)
      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

      public String getCacheDir()
      Returns the root cache folder. Used for all save/settings/etc. files in the user directory. The returned folder exists on arrival.
    • getCacheDirSub

      public String getCacheDirSub(String subPath)
      Returns the subPath, relative to the CacheDir path. NOTE: Does not create the subPath, nor ensure that it exists.
    • getMessagingDir

      public String getMessagingDir()
      Returns the messaging folder. Used for writing Trigger files for communicating with the game. The returned folder exists on arrival.
    • getMessagingDirSub

      public String getMessagingDirSub(String subPath)
      Returns the messaging folder. Used for writing Trigger files for communicating with the game. NOTE: Does not create the subPath, nor ensure that it exists.
    • getMediaRootFile

      public File getMediaRootFile()
    • getMediaRootPath

      public String getMediaRootPath()
    • getMediaFile

      public File getMediaFile(String subPath)
    • getMediaPath

      public String getMediaPath(String subPath)
    • getAbsoluteWorkDir

      public String getAbsoluteWorkDir()
    • getLocalWorkDir

      public String getLocalWorkDir()
    • getLocalWorkDirSub

      public String getLocalWorkDirSub(String subPath)
    • getAnimSetsPath

      public String getAnimSetsPath()
    • getActionGroupsPath

      public String getActionGroupsPath()
    • ensureFolderExists

      public static boolean ensureFolderExists(String path)
    • ensureFolderExists

      public static boolean ensureFolderExists(File directory)
    • searchFolders

      public void searchFolders(File fo)
    • getAllPathsContaining

      public Object[] getAllPathsContaining(String str)
    • getAllPathsContaining

      public Object[] getAllPathsContaining(String str, String str2)
    • getString

      public String getString(String str)
    • getAbsolutePath

      public String getAbsolutePath(String rel)
    • Reset

      public void Reset()
    • getCanonicalFile

      public File getCanonicalFile(File file)
    • getCanonicalFile

      public File getCanonicalFile(String path)
    • getCanonicalPath

      public String getCanonicalPath(File file)
    • getCanonicalPath

      public String getCanonicalPath(String path)
    • getCanonicalURI

      public URI getCanonicalURI(String path)
    • resetModFolders

      public void resetModFolders()
    • getInstalledItemModsFolders

      public void getInstalledItemModsFolders(ArrayList<String> out)
    • getStagedItemModsFolders

      public void getStagedItemModsFolders(ArrayList<String> out)
    • setModFoldersOrder

      public void setModFoldersOrder(String s)
    • getAllModFolders

      public void getAllModFolders(List<String> out)
    • getWorkshopItemMods

      public ArrayList<ChooseGameInfo.Mod> getWorkshopItemMods(long itemID)
    • searchForModInfo

      public ChooseGameInfo.Mod searchForModInfo(File path, String modSearched, ArrayList<ChooseGameInfo.Mod> mods)
    • loadMod

      public void loadMod(String path)
    • loadMods

      public void loadMods(String activeMods)
    • loadModsAux

      public String loadModsAux(ArrayList<String> toLoad, ArrayList<String> ordered)
    • loadMods

      public void loadMods(ArrayList<String> toLoad)
    • getModIDs

      public ArrayList<String> getModIDs()
    • getModDir

      public String getModDir(String modId)
    • getModInfoForDir

      public ChooseGameInfo.Mod getModInfoForDir(String modDir)
    • getRelativeFile

      public String getRelativeFile(File file)
    • getRelativeFile

      public String getRelativeFile(String string)
    • getRelativeFile

      public String getRelativeFile(URI root, File file)
    • getRelativeFile

      public String getRelativeFile(URI root, String string)
    • getAnimName

      public String getAnimName(URI mediaURI, File file)
    • resolveRelativePath

      public String resolveRelativePath(String srcFilePath, String relativePath)
    • saveModsFile

      public void saveModsFile()
    • loadModPackFiles

      public void loadModPackFiles()
    • loadModTileDefs

      public void loadModTileDefs()
    • loadModTileDefPropertyStrings

      public void loadModTileDefPropertyStrings()
    • loadFileGuidTable

      public void loadFileGuidTable()
    • getFileGuidTable

      public FileGuidTable getFileGuidTable()
    • getFilePathFromGuid

      public String getFilePathFromGuid(String guid)
    • getGuidFromFilePath

      public String getGuidFromFilePath(String path)
    • resolveFileOrGUID

      public String resolveFileOrGUID(String source)
      Takes a string source, which is either a GUID or a file path. Returns a file path, if found. If none is found, returns the original source.
    • isValidFilePathGuid

      public boolean isValidFilePathGuid(String source)
    • listAllDirectories

      public static File[] listAllDirectories(String rootPath, FileFilter filter, boolean recursive)
    • listAllDirectories

      public static File[] listAllDirectories(File root, FileFilter filter, boolean recursive)
    • listAllFiles

      public static File[] listAllFiles(String folderPath, FileFilter filter, boolean recursive)
    • listAllFiles

      public static File[] listAllFiles(File folder, FileFilter filter, boolean recursive)
    • walkGameAndModFiles

      public void walkGameAndModFiles(String relPath, boolean recursive, ZomboidFileSystem.IWalkFilesVisitor consumer)
    • resolveAllDirectories

      public String[] resolveAllDirectories(String relPath, FileFilter filter, boolean recursive)
    • resolveAllFiles

      public String[] resolveAllFiles(String relPath, FileFilter filter, boolean recursive)
    • normalizeFolderPath

      public String normalizeFolderPath(String path)
    • processFilePath

      public static String processFilePath(String filePath, char separatorChar)
    • tryDeleteFile

      public boolean tryDeleteFile(String filePath)
    • deleteFile

      public boolean deleteFile(String filePath) throws IOException
      Throws:
      IOException
    • update

      public void update()
    • cleanMultiplayerSaves

      public void cleanMultiplayerSaves()
    • resetDefaultModsForNewRelease

      public void resetDefaultModsForNewRelease(String versionStr)