Package net.simplace.core.service
Klasse FilePathHelper
java.lang.Object
net.simplace.core.service.FilePathHelper
Resource manager for FilePaths. Should be used allways to access the Filesystem
can be used for getting Temp-Dir (Unique while software is run), Cache-Dir (Unique per user)
and Random Temp-Dir (allways unique). All folders are situated in java.io.tmpdir/IMPETUS.
- Autor:
- Andreas Enders
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the Cache used for all sessions of this JavaVM.floatgetCacheVersion(String aSystemID, String aFileName, String aTargetDir) static FilePathHelperGet Singleton instance of FilePathLocator.static FilegetRandomFile(String aFileName) Returns the Tempfile used for only this call.Returns a Random Tempdir used for only this session of the JavaVM.static FilegetResourcePath(File aFile) Returns the Tempdir used for only this session of the JavaVM.Returns the Tempdir used for all sessions of this JavaVM.getTempFile(String aFileName) Returns the Tempfile used for only this call.booleanRemoves the whole tempdir.booleanRemoves the session - tempdir.voidsetNewCacheVersion(String aSystemID, String aFileName, String aTargetDir, float aVersion) setTempDirRoot(String aFilePath) Returns the aFilePath used for all sessions of this JavaVM.
-
Methodendetails
-
getInstance
Get Singleton instance of FilePathLocator.- Gibt zurück:
- Singleton instance of FilePathLocator
-
getTempDirRoot
Returns the Tempdir used for all sessions of this JavaVM.- Gibt zurück:
- the Tempdir used for all sessions of this JavaVM
-
setTempDirRoot
Returns the aFilePath used for all sessions of this JavaVM.- Parameter:
aFilePath-- Gibt zurück:
- the aFilePath used for all sessions of this JavaVM
-
getTempDir
Returns the Tempdir used for only this session of the JavaVM.- Gibt zurück:
- the Tempdir used for only this session of the JavaVM
-
getRandomTempDir
Returns a Random Tempdir used for only this session of the JavaVM.- Gibt zurück:
- a Random Tempdir used for only this session of the JavaVM
-
getCacheDir
Returns the Cache used for all sessions of this JavaVM.- Gibt zurück:
- the Cache used for all sessions of this JavaVM
-
setNewCacheVersion
public void setNewCacheVersion(String aSystemID, String aFileName, String aTargetDir, float aVersion) - Parameter:
aSystemID-aFileName-aTargetDir-aVersion-aI-
-
getCacheVersion
- Parameter:
aSystemID-aFileName-aTargetDir-- Gibt zurück:
- a cache version
-
getRandomFile
Returns the Tempfile used for only this call.- Parameter:
aFileName-- Gibt zurück:
- the Tempfile used for only this call
-
getTempFile
Returns the Tempfile used for only this call.- Parameter:
aFileName-- Gibt zurück:
- the Tempfile used for only this call
- Löst aus:
IOException
-
removeTempDir
public boolean removeTempDir()Removes the session - tempdir.- Gibt zurück:
- success
-
removeAllClientTempDirs
public boolean removeAllClientTempDirs()Removes the whole tempdir.- Gibt zurück:
- success
-
getLogFile
- Gibt zurück:
- Log file
-
getResourcePath
- Parameter:
aFile-- Gibt zurück:
- Resource path
-