Package com.atlassian.bamboo.util
Class SharedTemporaryFiles
- java.lang.Object
-
- com.atlassian.bamboo.util.SharedTemporaryFiles
-
public class SharedTemporaryFiles extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SharedTemporaryFiles.FileSpecBuilder
static class
SharedTemporaryFiles.SharedTemporaryFileSpec
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SharedTemporaryFiles.FileSpecBuilder
builder(@NotNull String content)
static File
create(@NotNull SharedTemporaryFiles.SharedTemporaryFileSpec temporaryFileSpec)
Returns a file with given prefix, suffix and content in the specified directory.
-
-
-
Method Detail
-
builder
public static SharedTemporaryFiles.FileSpecBuilder builder(@NotNull @NotNull String content)
-
create
public static File create(@NotNull @NotNull SharedTemporaryFiles.SharedTemporaryFileSpec temporaryFileSpec) throws IOException
Returns a file with given prefix, suffix and content in the specified directory. If the file already exists and was not created using this method, it's first deleted, otherwise an existing handle will be returned and no I/O will take place. Do not cache the returned reference or file name for a long time: the file will exist for 5 minutes after the call to this method is made. Repeated calls to this method with the same parameters reset the remaining file lifetime to 5 minutes.- Parameters:
temporaryFileSpec
- temporary file specs- Returns:
- handle to the file
- Throws:
IOException
-
-