Package io.github.astrapi69.file.system
Class SystemFileExtensions
java.lang.Object
io.github.astrapi69.file.system.SystemFileExtensions
The class
SystemFileExtensions
provide methods for get system or user files.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for the default configuration directory from the current user. current value:".config"static final String
Constant for the default download directory from the current user. current value:"Downloads"static final String
Constant for the default temporary directory from the current user. current value:"tmp" -
Method Summary
Modifier and TypeMethodDescriptionstatic File
Gets the installation directory for Java Runtime Environment (JRE) from the system asFile
objectstatic File
Gets the root directory from the system asFile
objectstatic File
Gets the temporary directory from the system as File object.static File
Gets the users configuration directory from the system asFile
objectstatic File
getUserConfigurationDir
(String configurationDirname) Gets the users configuration directory from the system asFile
objectstatic File
Gets the users downloads directory from the system asFile
objectstatic File
getUserDownloadsDir
(String downloadsDirname) Gets the users downloads directory from the system asFile
objectstatic File
Gets the user home directory from the system asFile
objectstatic File
Gets the users temporary directory from the system asFile
objectstatic File
getUserTempDir
(String tempDirname) Gets the users temporary directory from the system asFile
objectstatic File
Gets the user working directory from the system asFile
objectgetWindowsRootDriveDir
(char driveLetter)
-
Field Details
-
DEFAULT_USER_CONFIGURATION_DIRECTORY_NAME
Constant for the default configuration directory from the current user. current value:".config"- See Also:
-
DEFAULT_USER_DOWNLOAD_DIRECTORY_NAME
Constant for the default download directory from the current user. current value:"Downloads"- See Also:
-
DEFAULT_USER_TEMPORARY_DIRECTORY_NAME
Constant for the default temporary directory from the current user. current value:"tmp"- See Also:
-
-
Method Details
-
getJavaHomeDir
Gets the installation directory for Java Runtime Environment (JRE) from the system asFile
object- Returns:
- the installation directory for Java Runtime Environment (JRE) from the system as
File
object
-
getTempDir
Gets the temporary directory from the system as File object.- Returns:
- the temporary directory from the system.
-
getUserHomeDir
Gets the user home directory from the system asFile
object- Returns:
- the user home directory from the system as
File
object
-
getUserDownloadsDir
Gets the users downloads directory from the system asFile
object- Returns:
- the users downloads directory from the system as
File
object
-
getUserDownloadsDir
Gets the users downloads directory from the system asFile
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
-
getUserTempDir
Gets the users temporary directory from the system asFile
object- Returns:
- the users temporary directory from the system as
File
object
-
getUserTempDir
Gets the users temporary directory from the system asFile
object- Parameters:
tempDirname
- The name of the temporary directory, if null or empty the default value 'Downloads' will be taken- Returns:
- the users temporary directory from the system as
File
object
-
getUserConfigurationDir
Gets the users configuration directory from the system asFile
object- Parameters:
configurationDirname
- The name of the configuration directory, if null or empty the default value '.config' will be taken- Returns:
- the users configuration directory from the system as
File
object
-
getUserConfigurationDir
Gets the users configuration directory from the system asFile
object- Returns:
- the users configuration directory from the system as
File
object
-
getUserWorkingDir
Gets the user working directory from the system asFile
object- Returns:
- the user working directory from the system as
File
object
-
getRootDir
Gets the root directory from the system asFile
object- Returns:
- the root directory from the system as
File
object
-
getWindowsRootDriveDir
-