Class Filenames
java.lang.Object
com.realtime.crossfire.jxclient.settings.Filenames
Utility class to return references to settings files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PathgetDialogsFile(@NotNull String skinName) Returns the file for storing dialog related information for a skin.static @NotNull PathgetKeybindingsFileVersion1(@Nullable CharSequence hostname, @Nullable CharSequence character) Returns the fallback keybindings file.static @NotNull PathgetKeybindingsFileVersion2(@Nullable CharSequence hostname, @Nullable CharSequence character) Returns the keybindings file.static @NotNull PathReturns the image cache directory for magic map sized images.static @NotNull PathgetMessageLogFile(@Nullable String hostname) Returns the log file for text message logging.static @Nullable PathReturns the metaserver cache file.static @NotNull PathReturns the image cache directory.static @NotNull PathReturns the image cache directory for double size images.static @NotNull PathReturns the main settings file.static @NotNull PathgetSettingsFile(@NotNull String filename) Returns a file within the settings directory.static @NotNull PathgetShortcutsFile(@NotNull CharSequence hostname, @NotNull CharSequence character) Returns the shortcuts file.
-
Method Details
-
getOriginalImageCacheDir
Returns the image cache directory.- Returns:
- the image cache directory
-
getScaledImageCacheDir
Returns the image cache directory for double size images.- Returns:
- the image cache directory
-
getMagicMapImageCacheDir
Returns the image cache directory for magic map sized images.- Returns:
- the image cache directory
-
getSettingsFile
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 filecharacter- 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 filecharacter- 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 filecharacter- the character name;null=global key bindings file- Returns:
- the keybindings file
- Throws:
IOException- if the keybindings file cannot be accessed
-
getMetaserverCacheFile
Returns the metaserver cache file.- Returns:
- the metaserver cache file, or
nullif 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 ornull- Returns:
- the log file
- Throws:
IOException- if the log file cannot be determined
-