public class FileAccessServiceImpl extends java.lang.Object implements FileAccessService
Modifier and Type | Class and Description |
---|---|
static class |
FileAccessServiceImpl.GUID |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TEMP_FILE_PREFIX
The file prefix for all temp files.
|
static java.lang.String |
TEMP_FILE_SUFFIX
The file suffix for all temp files.
|
Constructor and Description |
---|
FileAccessServiceImpl() |
Modifier and Type | Method and Description |
---|---|
FailSafeTransaction |
createFailSafeTransaction(java.io.File file)
Creates a failsafe transaction which can be used to safely store
informations into a file.
|
java.io.File |
getDefaultDownloadDirectory()
Returns the default download directory.
|
java.io.File |
getPrivatePersistentDirectory(java.lang.String dirName)
Deprecated.
|
java.io.File |
getPrivatePersistentDirectory(java.lang.String dirName,
FileCategory category)
This method creates a directory specific to the current user.
|
java.io.File |
getPrivatePersistentFile(java.lang.String fileName)
Deprecated.
|
java.io.File |
getPrivatePersistentFile(java.lang.String fileName,
FileCategory category)
This method returns a file specific to the current user.
|
java.io.File |
getTemporaryDirectory()
Returns the temporary directory.
|
java.io.File |
getTemporaryFile()
This method returns a created temporary file.
|
public static final java.lang.String TEMP_FILE_PREFIX
public static final java.lang.String TEMP_FILE_SUFFIX
public java.io.File getTemporaryFile() throws java.io.IOException
getTemporaryFile
in interface FileAccessService
java.io.IOException
- If the file cannot be createdpublic java.io.File getTemporaryDirectory() throws java.io.IOException
getTemporaryDirectory
in interface FileAccessService
java.io.IOException
- if the temporary directory cannot not be created@Deprecated public java.io.File getPrivatePersistentFile(java.lang.String fileName) throws java.lang.Exception
getPrivatePersistentFile(String, FileCategory)
.getPrivatePersistentFile
in interface FileAccessService
java.lang.Exception
public java.io.File getPrivatePersistentFile(java.lang.String fileName, FileCategory category) throws java.lang.Exception
getPrivatePersistentFile
in interface FileAccessService
fileName
- The name of the private file you wish to accesscategory
- The classification of the file.java.lang.Exception
- if we faile to create the file.@Deprecated public java.io.File getPrivatePersistentDirectory(java.lang.String dirName) throws java.lang.Exception
getPrivatePersistentDirectory
in interface FileAccessService
java.lang.Exception
public java.io.File getPrivatePersistentDirectory(java.lang.String dirName, FileCategory category) throws java.lang.Exception
getPrivatePersistentDirectory
in interface FileAccessService
dirName
- The name of the private directory you wish to access.category
- The classification of the directory.java.lang.Exception
- Thrown if there is no suitable location for the persistent
directory.public java.io.File getDefaultDownloadDirectory() throws java.io.IOException
getDefaultDownloadDirectory
in interface FileAccessService
java.io.IOException
- if it I/O error occurredpublic FailSafeTransaction createFailSafeTransaction(java.io.File file)
createFailSafeTransaction
in interface FileAccessService
file
- The file concerned by the transaction, null if file is null.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.