public interface FoldersManager
extends java.lang.Iterable<java.lang.String>
Modifier and Type | Method and Description |
---|---|
void |
cleanTemporaryFiles()
Remove al files in the temporary folder.
|
java.io.File |
createTemporaryFile(java.lang.String basename,
byte[] data)
Creates a temporary file with a the provided name and data.
|
java.io.File |
createTemporaryFile(java.lang.String basename,
java.lang.String data) |
java.io.File |
createTemporaryFolder()
Force the creation of the temporary folder.
|
java.io.File |
get(java.lang.String id)
Retrieves the file associated with the indicated identifier.
|
java.io.File |
get(java.lang.String id,
java.io.File defaultValue)
Retrieves the file associated with the indicated identifier.
|
java.io.File |
getHome() |
java.io.File |
getLastPath(java.lang.String pathId) |
java.io.File |
getLastPath(java.lang.String pathId,
java.io.File defaultValue) |
java.io.File |
getTemporaryFile(java.lang.String... pathComponents)
Return a file with the specified relative path to the
temporary folder.
|
java.io.File |
getTemporaryFolder()
Return the file associated to the temporary folder.
|
java.io.File |
getUniqueFile(java.lang.String... pathComponents)
Return a unique file with the specified path.
|
java.io.File |
getUniqueTemporaryFile(java.lang.String... pathComponents)
Return a unique file with the specified relative path to the
temporary folder.
|
boolean |
isEmpty()
Returns true if there is no stored file.
|
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator over the identifiers of the stored files.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.io.File>> |
lastPathsIterator() |
void |
set(java.lang.String id,
java.io.File file)
Stores the file with the indicated identifier.
|
void |
setLastPath(java.lang.String pathId,
java.io.File value) |
void |
setTemporaryFolder(java.io.File folder)
Set the file associated to the temporary folder.
|
java.io.File getTemporaryFolder()
void setTemporaryFolder(java.io.File folder)
folder
- void cleanTemporaryFiles()
java.io.File createTemporaryFolder()
java.io.File getTemporaryFile(java.lang.String... pathComponents)
pathComponents
- java.io.File getUniqueTemporaryFile(java.lang.String... pathComponents)
pathComponents
- java.io.File getUniqueFile(java.lang.String... pathComponents)
pathComponents
- java.io.File createTemporaryFile(java.lang.String basename, byte[] data) throws java.io.IOException
basename
- of the temporary file to createdata
- The data to store in the filejava.io.IOException
java.io.File createTemporaryFile(java.lang.String basename, java.lang.String data) throws java.io.IOException
java.io.IOException
void set(java.lang.String id, java.io.File file)
id
- file
- java.io.File get(java.lang.String id)
id
- java.io.File get(java.lang.String id, java.io.File defaultValue)
id
- defaultValue
- java.io.File getHome()
java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
boolean isEmpty()
java.io.File getLastPath(java.lang.String pathId)
java.io.File getLastPath(java.lang.String pathId, java.io.File defaultValue)
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.io.File>> lastPathsIterator()
void setLastPath(java.lang.String pathId, java.io.File value)