Class SystemFileExtensions


  • public final class SystemFileExtensions
    extends java.lang.Object
    The class SystemFileExtensions provide methods for get system or user files.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.File getJavaHomeDir()
      Gets the installation directory for Java Runtime Environment (JRE) from the system as File object
      static java.io.File getTempDir()
      Gets the temporary directory from the system as File object.
      static java.io.File getUserDownloadsDir()
      Gets the users downloads directory from the system as File object
      static java.io.File getUserDownloadsDir​(java.lang.String downloadsDirname)
      Gets the users downloads directory from the system as File object
      static java.io.File getUserHomeDir()
      Gets the user home directory from the system as File object
      static java.io.File getUserWorkingDir()
      Gets the user working directory from the system as File object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getJavaHomeDir

        public static java.io.File getJavaHomeDir()
        Gets the installation directory for Java Runtime Environment (JRE) from the system as File object
        Returns:
        the installation directory for Java Runtime Environment (JRE) from the system as File object
      • getTempDir

        public static java.io.File getTempDir()
        Gets the temporary directory from the system as File object.
        Returns:
        the temporary directory from the system.
      • getUserHomeDir

        public static java.io.File getUserHomeDir()
        Gets the user home directory from the system as File object
        Returns:
        the user home directory from the system as File object
      • getUserDownloadsDir

        public static java.io.File getUserDownloadsDir()
        Gets the users downloads directory from the system as File object
        Returns:
        the users downloads directory from the system as File object
      • getUserDownloadsDir

        public static java.io.File getUserDownloadsDir​(java.lang.String downloadsDirname)
        Gets the users downloads directory from the system as File object
        Parameters:
        downloadsDirname - The name of the downloads directory, if null or empty the default value '/Downloads' will be taken
        Returns:
        the users downloads directory from the system as File object
      • getUserWorkingDir

        public static java.io.File getUserWorkingDir()
        Gets the user working directory from the system as File object
        Returns:
        the user working directory from the system as File object