Class Overview
TempFileFactory implementation for managing deletion of temporary files.
Public Constructors
Public Methods
@Nullable
public
SessionTempFile
getSessionTempFile
(String path)
Returns the SessionTempFile for the file at path
, which must have been previously created using makeSessionTempFile(String)
, or null if not found.
Parameters
path
| a relative (within java.io.tmpdir ) or absolute path |
Returns
- a SessionTempFile or null if there is no SessionTempFile for
path
@Nonnull
public
SessionTempFile
makeSessionTempFile
(String path)
Makes a new SessionTempFile for the file at path
. The lifecycle of the SessionTempFile will become bound
to the HTTP session associated with the current thread, meaning that the file will be deleted when the session is
destroyed.
Note that for security reasons
path
must point to a file in
java.io.tmpdir
or in JIRA's temporary
attachments directory.
Parameters
path
| a relative (within java.io.tmpdir ) or absolute path |