Class Filenames


  • public class Filenames
    extends java.lang.Object
    Utility 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.Path getDialogsFile​(@NotNull java.lang.String skinName)
      Returns the file for storing dialog related information for a skin.
      static @NotNull java.nio.file.Path getKeybindingsFileVersion1​(@Nullable java.lang.CharSequence hostname, @Nullable java.lang.CharSequence character)
      Returns the fallback keybindings file.
      static @NotNull java.nio.file.Path getKeybindingsFileVersion2​(@Nullable java.lang.CharSequence hostname, @Nullable java.lang.CharSequence character)
      Returns the keybindings file.
      static @NotNull java.nio.file.Path getMagicMapImageCacheDir()
      Returns the image cache directory for magic map sized images.
      static @NotNull java.nio.file.Path getMessageLogFile​(@Nullable java.lang.String hostname)
      Returns the log file for text message logging.
      static @Nullable java.nio.file.Path getMetaserverCacheFile()
      Returns the metaserver cache file.
      static @NotNull java.nio.file.Path getOriginalImageCacheDir()
      Returns the image cache directory.
      static @NotNull java.nio.file.Path getScaledImageCacheDir()
      Returns the image cache directory for double size images.
      static @NotNull java.nio.file.Path getSettingsFile()
      Returns the main settings file.
      static @NotNull java.nio.file.Path getSettingsFile​(@NotNull java.lang.String filename)
      Returns a file within the settings directory.
      static @NotNull java.nio.file.Path getShortcutsFile​(@NotNull java.lang.CharSequence hostname, @NotNull java.lang.CharSequence character)
      Returns the shortcuts file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.IOException
        Returns 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.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:
        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.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:
        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.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:
        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 null if the file cannot be accessed
      • getDialogsFile

        @NotNull
        public static @NotNull java.nio.file.Path getDialogsFile​(@NotNull
                                                                 @NotNull java.lang.String skinName)
                                                          throws java.io.IOException
        Returns 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.IOException
        Returns 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.IOException
        Returns the log file for text message logging.
        Parameters:
        hostname - the server hostname or null
        Returns:
        the log file
        Throws:
        java.io.IOException - if the log file cannot be determined