Class Filenames

java.lang.Object
com.realtime.crossfire.jxclient.settings.Filenames

public class Filenames extends Object
Utility class to return references to settings files.
  • Method Details

    • getOriginalImageCacheDir

      @NotNull public static @NotNull Path getOriginalImageCacheDir()
      Returns the image cache directory.
      Returns:
      the image cache directory
    • getScaledImageCacheDir

      @NotNull public static @NotNull Path getScaledImageCacheDir()
      Returns the image cache directory for double size images.
      Returns:
      the image cache directory
    • getMagicMapImageCacheDir

      @NotNull public static @NotNull Path getMagicMapImageCacheDir()
      Returns the image cache directory for magic map sized images.
      Returns:
      the image cache directory
    • getSettingsFile

      @NotNull public static @NotNull Path getSettingsFile() throws IOException
      Returns the main settings file.
      Returns:
      the main settings file
      Throws:
      IOException - if the file cannot be accessed
    • getShortcutsFile

      @NotNull public static @NotNull Path getShortcutsFile(@NotNull @NotNull CharSequence hostname, @NotNull @NotNull CharSequence character) throws IOException
      Returns the shortcuts file.
      Parameters:
      hostname - the hostname of the character; null=global key bindings file
      character - the character name; null=global key bindings file
      Returns:
      the shortcuts file
      Throws:
      IOException - if the file cannot be accessed
    • getKeybindingsFileVersion2

      @NotNull public static @NotNull Path getKeybindingsFileVersion2(@Nullable @Nullable CharSequence hostname, @Nullable @Nullable CharSequence character) throws IOException
      Returns the keybindings file.
      Parameters:
      hostname - the hostname of the character; null=global key bindings file
      character - the character name; null=global key bindings file
      Returns:
      the keybindings file
      Throws:
      IOException - if the keybindings file cannot be accessed
    • getKeybindingsFileVersion1

      @NotNull public static @NotNull Path getKeybindingsFileVersion1(@Nullable @Nullable CharSequence hostname, @Nullable @Nullable CharSequence character) throws IOException
      Returns the fallback keybindings file.
      Parameters:
      hostname - the hostname of the character; null=global key bindings file
      character - the character name; null=global key bindings file
      Returns:
      the keybindings file
      Throws:
      IOException - if the keybindings file cannot be accessed
    • getMetaserverCacheFile

      @Nullable public static @Nullable Path getMetaserverCacheFile()
      Returns the metaserver cache file.
      Returns:
      the metaserver cache file, or null if the file cannot be accessed
    • getDialogsFile

      @NotNull public static @NotNull Path getDialogsFile(@NotNull @NotNull String skinName) throws IOException
      Returns the file for storing dialog related information for a skin.
      Parameters:
      skinName - identifies the skin
      Returns:
      the file
      Throws:
      IOException - if the file cannot be accessed
    • getSettingsFile

      @NotNull public static @NotNull Path getSettingsFile(@NotNull @NotNull String filename) throws IOException
      Returns a file within the settings directory.
      Parameters:
      filename - the filename
      Returns:
      the settings file
      Throws:
      IOException - if the file cannot be accessed
    • getMessageLogFile

      @NotNull public static @NotNull Path getMessageLogFile(@Nullable @Nullable String hostname) throws IOException
      Returns the log file for text message logging.
      Parameters:
      hostname - the server hostname or null
      Returns:
      the log file
      Throws:
      IOException - if the log file cannot be determined