Sdílet prostřednictvím


ShareFileCopyOptions Class

  • java.lang.Object
    • com.azure.storage.file.share.options.ShareFileCopyOptions

public final class ShareFileCopyOptions

Extended options that may be passed when copying a share.

Constructor Summary

Constructor Description
ShareFileCopyOptions()

Creates a new instance of ShareFileCopyOptions.

Method Summary

Modifier and Type Method and Description
ShareRequestConditions getDestinationRequestConditions()

Gets the ShareRequestConditions.

String getFilePermission()

Gets the file permission key.

FilePermissionFormat getFilePermissionFormat()

Gets the file permission format.

Map<String,String> getMetadata()

Gets the metadata to associate with the file.

PermissionCopyModeType getPermissionCopyModeType()

Gets the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

FileSmbProperties getSmbProperties()

Gets the SMB properties to set on the destination file.

CopyableFileSmbPropertiesList getSmbPropertiesToCopy()

Gets the SMB properties to copy from the source file.

Boolean isArchiveAttributeSet()

Gets the optional boolean specifying to set archive attribute on a target file.

Boolean isIgnoreReadOnly()

Gets the optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

ShareFileCopyOptions setArchiveAttribute(Boolean archiveAttribute)

Sets the optional boolean specifying to set archive attribute on a target file.

ShareFileCopyOptions setDestinationRequestConditions(ShareRequestConditions requestConditions)

Sets the ShareRequestConditions to add conditions on copying the file.

ShareFileCopyOptions setFilePermission(String filePermissionKey)

Sets the file permission key.

ShareFileCopyOptions setFilePermissionFormat(FilePermissionFormat filePermissionFormat)

Sets the file permission format.

ShareFileCopyOptions setIgnoreReadOnly(Boolean ignoreReadOnly)

Sets the optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

ShareFileCopyOptions setMetadata(Map<String,String> metadata)

Sets the metadata to associate with the file.

ShareFileCopyOptions setPermissionCopyModeType(PermissionCopyModeType copyModeType)

Sets the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

ShareFileCopyOptions setSmbProperties(FileSmbProperties smbProperties)

Sets the SMB properties to set on the destination file.

ShareFileCopyOptions setSmbPropertiesToCopy(CopyableFileSmbPropertiesList smbProperties)

Sets the SMB properties to copy from the source file.

Methods inherited from java.lang.Object

Constructor Details

ShareFileCopyOptions

public ShareFileCopyOptions()

Creates a new instance of ShareFileCopyOptions.

Method Details

getDestinationRequestConditions

public ShareRequestConditions getDestinationRequestConditions()

Gets the ShareRequestConditions.

Returns:

getFilePermission

public String getFilePermission()

Gets the file permission key.

Returns:

The file's permission key.

getFilePermissionFormat

public FilePermissionFormat getFilePermissionFormat()

Gets the file permission format.

Returns:

file permission format.

getMetadata

public Map getMetadata()

Gets the metadata to associate with the file.

Returns:

Metadata to associate with the file.

getPermissionCopyModeType

public PermissionCopyModeType getPermissionCopyModeType()

Gets the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

Returns:

the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

getSmbProperties

public FileSmbProperties getSmbProperties()

Gets the SMB properties to set on the destination file.

Returns:

Optional SMB properties to set on the destination file or directory. The only properties that are considered are file attributes, file creation time, file last write time, and file permission key. The rest are ignored.

getSmbPropertiesToCopy

public CopyableFileSmbPropertiesList getSmbPropertiesToCopy()

Gets the SMB properties to copy from the source file.

Returns:

SMB properties to copy from the source file.

isArchiveAttributeSet

public Boolean isArchiveAttributeSet()

Gets the optional boolean specifying to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state.

Returns:

Optional boolean specifying to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state.

isIgnoreReadOnly

public Boolean isIgnoreReadOnly()

Gets the optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

Returns:

Optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

setArchiveAttribute

public ShareFileCopyOptions setArchiveAttribute(Boolean archiveAttribute)

Sets the optional boolean specifying to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state.

Parameters:

archiveAttribute - Optional boolean Specifying to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state.

Returns:

The updated options.

setDestinationRequestConditions

public ShareFileCopyOptions setDestinationRequestConditions(ShareRequestConditions requestConditions)

Sets the ShareRequestConditions to add conditions on copying the file.

Parameters:

requestConditions - ShareRequestConditions

Returns:

The updated options.

setFilePermission

public ShareFileCopyOptions setFilePermission(String filePermissionKey)

Sets the file permission key.

Parameters:

filePermissionKey - The file permission key.

Returns:

the updated options.

setFilePermissionFormat

public ShareFileCopyOptions setFilePermissionFormat(FilePermissionFormat filePermissionFormat)

Sets the file permission format.

Parameters:

filePermissionFormat - the file permission format.

Returns:

The updated options.

setIgnoreReadOnly

public ShareFileCopyOptions setIgnoreReadOnly(Boolean ignoreReadOnly)

Sets the optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

Parameters:

ignoreReadOnly - Optional boolean specifying to overwrite the target file if it already exists and has read-only attribute set.

Returns:

The updated options.

setMetadata

public ShareFileCopyOptions setMetadata(Map metadata)

Sets the metadata to associate with the file.

Parameters:

metadata - Metadata to associate with the file. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.

Returns:

The updated options.

setPermissionCopyModeType

public ShareFileCopyOptions setPermissionCopyModeType(PermissionCopyModeType copyModeType)

Sets the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

Parameters:

copyModeType - specified option to copy file security descriptor from source file or to set it using the value which is defined by the header value of FilePermission or FilePermissionKey.

Returns:

The updated options.

setSmbProperties

public ShareFileCopyOptions setSmbProperties(FileSmbProperties smbProperties)

Sets the SMB properties to set on the destination file.

Parameters:

smbProperties - Optional SMB properties to set on the destination file or directory. The only properties that are considered are file attributes, file creation time, file last write time, and file permission key. The rest are ignored.

Returns:

The updated options.

setSmbPropertiesToCopy

public ShareFileCopyOptions setSmbPropertiesToCopy(CopyableFileSmbPropertiesList smbProperties)

Sets the SMB properties to copy from the source file.

Parameters:

smbProperties - list of SMB properties to copy from the source file.

Returns:

The updated options.

Applies to