Class Filenames
- java.lang.Object
-
- com.realtime.crossfire.jxclient.settings.Filenames
-
public class Filenames extends java.lang.ObjectUtility class to return references to settings files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.nio.file.PathgetDialogsFile(@NotNull java.lang.String skinName)Returns the file for storing dialog related information for a skin.static @NotNull java.nio.file.PathgetKeybindingsFileVersion1(@Nullable java.lang.CharSequence hostname, @Nullable java.lang.CharSequence character)Returns the fallback keybindings file.static @NotNull java.nio.file.PathgetKeybindingsFileVersion2(@Nullable java.lang.CharSequence hostname, @Nullable java.lang.CharSequence character)Returns the keybindings file.static @NotNull java.nio.file.PathgetMagicMapImageCacheDir()Returns the image cache directory for magic map sized images.static @NotNull java.nio.file.PathgetMessageLogFile(@Nullable java.lang.String hostname)Returns the log file for text message logging.static @Nullable java.nio.file.PathgetMetaserverCacheFile()Returns the metaserver cache file.static @NotNull java.nio.file.PathgetOriginalImageCacheDir()Returns the image cache directory.static @NotNull java.nio.file.PathgetScaledImageCacheDir()Returns the image cache directory for double size images.static @NotNull java.nio.file.PathgetSettingsFile()Returns the main settings file.static @NotNull java.nio.file.PathgetSettingsFile(@NotNull java.lang.String filename)Returns a file within the settings directory.static @NotNull java.nio.file.PathgetShortcutsFile(@NotNull java.lang.CharSequence hostname, @NotNull java.lang.CharSequence character)Returns the shortcuts file.
-
-
-
Method Detail
-
getOriginalImageCacheDir
@NotNull public static @NotNull java.nio.file.Path getOriginalImageCacheDir()
Returns the image cache directory.- Returns:
- the image cache directory
-
getScaledImageCacheDir
@NotNull public static @NotNull java.nio.file.Path getScaledImageCacheDir()
Returns the image cache directory for double size images.- Returns:
- the image cache directory
-
getMagicMapImageCacheDir
@NotNull public static @NotNull java.nio.file.Path getMagicMapImageCacheDir()
Returns the image cache directory for magic map sized images.- Returns:
- the image cache directory
-
getSettingsFile
@NotNull public static @NotNull java.nio.file.Path getSettingsFile() throws java.io.IOExceptionReturns the main settings file.- Returns:
- the main settings file
- Throws:
java.io.IOException- if the file cannot be accessed
-
getShortcutsFile
@NotNull public static @NotNull java.nio.file.Path getShortcutsFile(@NotNull @NotNull java.lang.CharSequence hostname, @NotNull @NotNull java.lang.CharSequence character) throws java.io.IOExceptionReturns 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:
java.io.IOException- if the file cannot be accessed
-
getKeybindingsFileVersion2
@NotNull public static @NotNull java.nio.file.Path getKeybindingsFileVersion2(@Nullable @Nullable java.lang.CharSequence hostname, @Nullable @Nullable java.lang.CharSequence character) throws java.io.IOExceptionReturns 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:
java.io.IOException- if the keybindings file cannot be accessed
-
getKeybindingsFileVersion1
@NotNull public static @NotNull java.nio.file.Path getKeybindingsFileVersion1(@Nullable @Nullable java.lang.CharSequence hostname, @Nullable @Nullable java.lang.CharSequence character) throws java.io.IOExceptionReturns 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:
java.io.IOException- if the keybindings file cannot be accessed
-
getMetaserverCacheFile
@Nullable public static @Nullable java.nio.file.Path getMetaserverCacheFile()
Returns the metaserver cache file.- Returns:
- the metaserver cache file, or
nullif the file cannot be accessed
-
getDialogsFile
@NotNull public static @NotNull java.nio.file.Path getDialogsFile(@NotNull @NotNull java.lang.String skinName) throws java.io.IOExceptionReturns the file for storing dialog related information for a skin.- Parameters:
skinName- identifies the skin- Returns:
- the file
- Throws:
java.io.IOException- if the file cannot be accessed
-
getSettingsFile
@NotNull public static @NotNull java.nio.file.Path getSettingsFile(@NotNull @NotNull java.lang.String filename) throws java.io.IOExceptionReturns a file within the settings directory.- Parameters:
filename- the filename- Returns:
- the settings file
- Throws:
java.io.IOException- if the file cannot be accessed
-
getMessageLogFile
@NotNull public static @NotNull java.nio.file.Path getMessageLogFile(@Nullable @Nullable java.lang.String hostname) throws java.io.IOExceptionReturns the log file for text message logging.- Parameters:
hostname- the server hostname ornull- Returns:
- the log file
- Throws:
java.io.IOException- if the log file cannot be determined
-
-