net.simplace.util.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.


public final class FilePathHelper {


// Class Methods
public static synchronized FilePathHelper getInstance();

Get Singleton instance of FilePathLocator.
returns Singleton instance of FilePathLocator
public static File getLogFile();


returns Log file
public static File getResourcePath(File aFile);


returns Resource path

// Public Instance Methods
public String getTempDirRoot();

Returns the Tempdir used for all sessions of this JavaVM.
returns the Tempdir used for all sessions of this JavaVM
public String setTempDirRoot(String aFilePath);

Returns the aFilePath used for all sessions of this JavaVM.
returns the aFilePath used for all sessions of this JavaVM
public String getTempDir();

Returns the Tempdir used for only this session of the JavaVM.
returns the Tempdir used for only this session of the JavaVM
public String getRandomTempDir();

Returns a Random Tempdir used for only this session of the JavaVM.
returns a Random Tempdir used for only this session of the JavaVM
public String getCacheDir();

Returns the Cache used for all sessions of this JavaVM.
returns the Cache used for all sessions of this JavaVM
public void setNewCacheVersion(String aSystemID, String aFileName, String
aTargetDir, float aVersion);

public float getCacheVersion(String aSystemID, String aFileName, String
aTargetDir);


returns a cache version
public File getRandomFile(String aFileName);

Returns the Tempfile used for only this call.
returns the Tempfile used for only this call
public File getTempFile(String aFileName) throws IOException;

Returns the Tempfile used for only this call.
returns the Tempfile used for only this call
public boolean removeTempDir();

Removes the session - tempdir.
returns success
public boolean removeAllClientTempDirs();

Removes the whole tempdir.
returns success


}



Returned by: getInstance()