public abstract class CreateFileOptions extends Object
GoogleCloudStorageFileSystem.| Modifier and Type | Class and Description |
|---|---|
static class |
CreateFileOptions.Builder
Builder for
CreateFileOptions |
| Modifier and Type | Field and Description |
|---|---|
static CreateFileOptions |
DEFAULT_NO_OVERWRITE |
static CreateFileOptions |
DEFAULT_OVERWRITE |
| Constructor and Description |
|---|
CreateFileOptions() |
| Modifier and Type | Method and Description |
|---|---|
static CreateFileOptions.Builder |
builder() |
abstract com.google.common.collect.ImmutableMap<String,byte[]> |
getAttributes()
Extended attributes to set when creating a file.
|
abstract String |
getContentType()
Content-type to set when creating a file.
|
abstract long |
getOverwriteGenerationId()
Generation of existing object to overwrite.
|
abstract boolean |
isEnsureNoDirectoryConflict()
If true, makes sure there isn't already a directory object of the same name.
|
abstract boolean |
isOverwriteExisting()
Whether to overwrite an existing file with the same name.
|
abstract CreateFileOptions.Builder |
toBuilder() |
public static final CreateFileOptions DEFAULT_NO_OVERWRITE
public static final CreateFileOptions DEFAULT_OVERWRITE
public static CreateFileOptions.Builder builder()
public abstract CreateFileOptions.Builder toBuilder()
public abstract com.google.common.collect.ImmutableMap<String,byte[]> getAttributes()
@Nullable public abstract String getContentType()
public abstract boolean isEnsureNoDirectoryConflict()
public abstract boolean isOverwriteExisting()
public abstract long getOverwriteGenerationId()
StorageResourceId.UNKNOWN_GENERATION_ID, but otherwise this is used instead of overwriteExisting, where 0 indicates no existing object, and otherwise an existing object will
only be overwritten by the newly created file if its generation matches this provided
generationId.Copyright © 2023. All rights reserved.