Package com.equo.application.client.os
Class CommonFolders
java.lang.Object
com.equo.application.client.os.CommonFolders
The
CommonFolders
class represents common directories and their paths
in a file system. It provides methods to retrieve paths for cache, data, state, runtime,
and config directories. This class also handles the instantiation of platform-specific
implementations based on the operating system.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Dir represents various types of directories. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Path
Returns the path of the cache directory based on the rootConfig.abstract Path
Returns the path of the config directory based on the rootConfig.abstract Path
Returns the path of the data directory based on the rootConfig.static CommonFolders
Returns an instance of a class based on the operating system being used.abstract Path
Returns the path of the runtime directory based on the rootConfig.abstract Path
Returns the path of the state directory based on the rootConfig.protected String
userHome()
Returns the path of the user's home directory.
-
Field Details
-
EQUO
- See Also:
-
-
Constructor Details
-
CommonFolders
public CommonFolders()
-
-
Method Details
-
userHome
Returns the path of the user's home directory.- Returns:
- The value of the system property "user.home", which represents the user's home directory.
-
cacheDirHome
Returns the path of the cache directory based on the rootConfig.- Returns:
- The path of the cache directory based on the rootConfig.
-
dataDirHome
Returns the path of the data directory based on the rootConfig.- Returns:
- The path of the data directory based on the rootConfig.
-
stateDirHome
Returns the path of the state directory based on the rootConfig.- Returns:
- The path of the state directory based on the rootConfig.
-
runtimeDirHome
Returns the path of the runtime directory based on the rootConfig.- Returns:
- The path of the runtime directory based on the rootConfig.
-
configDir
Returns the path of the config directory based on the rootConfig.- Returns:
- The path of the config directory based on the rootConfig.
-
getInstance
Returns an instance of a class based on the operating system being used.- Returns:
- The method returns an instance of the `CommonFolders` class, depending on the operating system in use. If it's Windows, it returns an instance of the `Windows` class; if it's Macintosh, it returns an instance of the `Mac` class. Otherwise, it returns an instance of the `Linux` class.
-