Class SysUtils

java.lang.Object
gaiasky.desktop.util.SysUtils

public class SysUtils extends Object
Wee utility class to check the operating system and the desktop environment. It also offers retrieval of common system folders.
  • Constructor Details

    • SysUtils

      public SysUtils()
  • Method Details

    • mkdirs

      public static void mkdirs()
      Initialise directories.
    • mkdir

      public static void mkdir(Path dir)
    • getXdgDesktop

      public static String getXdgDesktop()
    • checkLinuxDesktop

      public static boolean checkLinuxDesktop(String desktop)
    • checkUnity

      public static boolean checkUnity()
    • checkGnome

      public static boolean checkGnome()
    • checkKDE

      public static boolean checkKDE()
    • checkXfce

      public static boolean checkXfce()
    • checkBudgie

      public static boolean checkBudgie()
    • checkI3

      public static boolean checkI3()
    • getOSName

      public static String getOSName()
    • getOSFamily

      public static String getOSFamily()
    • isLinux

      public static boolean isLinux()
    • isWindows

      public static boolean isWindows()
    • isMac

      public static boolean isMac()
    • isUnix

      public static boolean isUnix()
    • isSolaris

      public static boolean isSolaris()
    • launchedViaInstall4j

      public static boolean launchedViaInstall4j()
    • getOSArchitecture

      public static String getOSArchitecture()
    • getOSVersion

      public static String getOSVersion()
    • getDefaultCameraDir

      public static Path getDefaultCameraDir()
      Gets a file pointer to the camera directory.
      Returns:
      A pointer to the Gaia Sky camera directory.
    • getDefaultScreenshotsDir

      public static Path getDefaultScreenshotsDir()
      Gets a file pointer to the default screenshots directory.
      Returns:
      A pointer to the Gaia Sky screenshots directory.
    • getDefaultFramesDir

      public static Path getDefaultFramesDir()
      Gets a file pointer to the frames directory.
      Returns:
      A pointer to the Gaia Sky frames directory.
    • getDefaultMusicDir

      public static Path getDefaultMusicDir()
      Gets a file pointer to the music directory.
      Returns:
      A pointer to the Gaia Sky music directory.
    • getDefaultMappingsDir

      public static Path getDefaultMappingsDir()
      Gets a file pointer to the mappings directory.
      Returns:
      A pointer to the Gaia Sky mappings directory.
    • getMappingsDirName

      public static String getMappingsDirName()
    • getDefaultBookmarksDir

      public static Path getDefaultBookmarksDir()
      Gets a file pointer to the bookmarks directory.
      Returns:
      A pointer to the Gaia Sky bookmarks directory.
    • getBookmarksDirName

      public static String getBookmarksDirName()
    • getDefaultMpcdiDir

      public static Path getDefaultMpcdiDir()
      Gets a file pointer to the mpcdi directory.
      Returns:
      A pointer to the Gaia Sky mpcdi directory.
    • getLocalDataDir

      public static Path getLocalDataDir()
      Gets a file pointer to the local data directory where the data files are downloaded and stored.
      Returns:
      A pointer to the local data directory where the data files are.
    • getCrashReportsDir

      public static Path getCrashReportsDir()
      Gets a file pointer to the crash reports directory, where crash reports are stored.
      Returns:
      A pointer to the crash reports directory.
    • getTempDir

      public static Path getTempDir(String dataLocation)
      Gets the path to the actual temporary directory in the data folder. It needs the location of the user-configured data folder as input.
      Parameters:
      dataLocation - The user-defined data location.
      Returns:
      A path that points to the temporary directory.
    • getDataDir

      public static Path getDataDir()
      Returns the default data directory. That is ~/.gaiasky/ in Windows and macOS, and ~/.local/share/gaiasky in Linux.
      Returns:
      Default data directory.
    • getCacheDir

      public static Path getCacheDir()
      Returns the default cache directory, for non-essential data. This is ~/.gaiasky/ in Windows and macOS, and ~/.cache/gaiasky in Linux.
      Returns:
      The default cache directory.
    • getConfigDir

      public static Path getConfigDir()
    • getHomeDir

      public static Path getHomeDir()
    • getUserHome

      public static Path getUserHome()
    • getJavaVersion

      public static double getJavaVersion()