public static class SecureTemporaryFiles.FileSpecBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected File |
directory |
protected boolean |
executable |
protected boolean |
failWhenPermissionsNotSet |
protected boolean |
is83PathPreferred |
protected String |
name |
protected String |
prefix |
protected String |
suffix |
protected boolean |
useShortDirectoryName |
Modifier | Constructor and Description |
---|---|
protected |
FileSpecBuilder() |
Modifier and Type | Method and Description |
---|---|
SecureTemporaryFiles.TemporaryFileSpec |
build() |
SecureTemporaryFiles.FileSpecBuilder |
failWhenPermissionsNotSet() |
SecureTemporaryFiles.FileSpecBuilder |
setDir(File directory) |
SecureTemporaryFiles.FileSpecBuilder |
setExecutable(boolean executable) |
SecureTemporaryFiles.FileSpecBuilder |
setName(String name) |
SecureTemporaryFiles.FileSpecBuilder |
setPrefer83PathsOnWindows(boolean is83PathPreferred) |
SecureTemporaryFiles.FileSpecBuilder |
setPrefix(String prefix) |
SecureTemporaryFiles.FileSpecBuilder |
setSuffix(String suffix) |
SecureTemporaryFiles.FileSpecBuilder |
useShortDirectoryName() |
protected String prefix
protected String suffix
protected String name
protected boolean executable
protected File directory
protected boolean is83PathPreferred
protected boolean useShortDirectoryName
protected boolean failWhenPermissionsNotSet
public SecureTemporaryFiles.FileSpecBuilder setPrefix(@NotNull String prefix)
public SecureTemporaryFiles.FileSpecBuilder setSuffix(@Nullable String suffix)
suffix
- the file name suffixpublic SecureTemporaryFiles.FileSpecBuilder setName(@NotNull String name)
public SecureTemporaryFiles.FileSpecBuilder setExecutable(boolean executable)
executable
- whether or not make the file executablepublic SecureTemporaryFiles.FileSpecBuilder setDir(@Nullable File directory)
directory
- the directory in which to create file (temp directory unless specified otherwise)public SecureTemporaryFiles.FileSpecBuilder setPrefer83PathsOnWindows(boolean is83PathPreferred)
is83PathPreferred
- try using 8.3 paths if possible (only on Windows, ignored on other platforms)public SecureTemporaryFiles.FileSpecBuilder useShortDirectoryName()
public SecureTemporaryFiles.FileSpecBuilder failWhenPermissionsNotSet()
public SecureTemporaryFiles.TemporaryFileSpec build()
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.