Class SysUtils
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.desktop.util.SysUtils
-
public class SysUtils extends java.lang.ObjectWee utility class to check the operating system and the desktop environment. It also offers retrieval of common system folders.
-
-
Constructor Summary
Constructors Constructor Description SysUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckBudgie()static booleancheckGnome()static booleancheckI3()static booleancheckKDE()static booleancheckLinuxDesktop(java.lang.String desktop)static booleancheckUnity()static booleancheckXfce()static java.io.FilegetConfigDir()static java.io.FilegetCrashReportsDir()Gets a file pointer to the crash reports directory, where crash reports are stored.static java.io.FilegetDataDir()Returns the default data directory.static java.io.FilegetDefaultCameraDir()Gets a file pointer to the camera directory.static java.io.FilegetDefaultFramesDir()Gets a file pointer to the frames directory.static java.io.FilegetDefaultMappingsDir()Gets a file pointer to the mappings directory.static java.io.FilegetDefaultMusicDir()Gets a file pointer to the music directory.static java.io.FilegetDefaultScreenshotsDir()Gets a file pointer to the default screenshots directory.static java.io.FilegetDefaultTmpDir()Gets a file pointer to the $HOME/.gaiasky/tmp directory.static java.io.FilegetHomeDir()static java.lang.StringgetHomeDirString()static java.io.FilegetLocalDataDir()Gets a file pointer to the local data directory where the data files are downloaded and stored.static java.lang.StringgetMappingsDirName()static java.lang.StringgetOSArchitecture()static java.lang.StringgetOSFamily()static java.lang.StringgetOSName()static java.lang.StringgetOSVersion()static java.lang.StringgetXdgDesktop()static booleanisLinux()static booleanisMac()static booleanisSolaris()static booleanisUnix()static booleanisWindows()static voidmkdirs()Initialise directories
-
-
-
Method Detail
-
mkdirs
public static void mkdirs()
Initialise directories
-
getXdgDesktop
public static java.lang.String getXdgDesktop()
-
checkLinuxDesktop
public static boolean checkLinuxDesktop(java.lang.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 java.lang.String getOSName()
-
getOSFamily
public static java.lang.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()
-
getOSArchitecture
public static java.lang.String getOSArchitecture()
-
getOSVersion
public static java.lang.String getOSVersion()
-
getDefaultCameraDir
public static java.io.File getDefaultCameraDir()
Gets a file pointer to the camera directory.- Returns:
- A pointer to the Gaia Sky camera directory
-
getDefaultScreenshotsDir
public static java.io.File getDefaultScreenshotsDir()
Gets a file pointer to the default screenshots directory.- Returns:
- A pointer to the Gaia Sky screenshots directory
-
getDefaultFramesDir
public static java.io.File getDefaultFramesDir()
Gets a file pointer to the frames directory.- Returns:
- A pointer to the Gaia Sky frames directory
-
getDefaultMusicDir
public static java.io.File getDefaultMusicDir()
Gets a file pointer to the music directory.- Returns:
- A pointer to the Gaia Sky music directory
-
getDefaultMappingsDir
public static java.io.File getDefaultMappingsDir()
Gets a file pointer to the mappings directory.- Returns:
- A pointer to the Gaia Sky mappings directory
-
getMappingsDirName
public static java.lang.String getMappingsDirName()
-
getLocalDataDir
public static java.io.File 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 java.io.File getCrashReportsDir()
Gets a file pointer to the crash reports directory, where crash reports are stored.- Returns:
- A pointer to the crash reports directory
-
getDefaultTmpDir
public static java.io.File getDefaultTmpDir()
Gets a file pointer to the $HOME/.gaiasky/tmp directory.- Returns:
- A pointer to the Gaia Sky temporary directory in the user's home.
-
getDataDir
public static java.io.File getDataDir()
Returns the default data directory. That is ~/.gaiasky/ in Windows and macOS, and ~/.local/share/gaiasky in Linux.- Returns:
- Default data directory
-
getHomeDir
public static java.io.File getHomeDir()
-
getHomeDirString
public static java.lang.String getHomeDirString()
-
getConfigDir
public static java.io.File getConfigDir()
-
-