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()

Method Summary

Modifier and Type Method and Description
ShareRequestConditions getDestinationRequestConditions()

Gets the ShareRequestConditions.

String getFilePermission()
Map<String,String> getMetadata()
PermissionCopyModeType getPermissionCopyModeType()
FileSmbProperties getSmbProperties()
CopyableFileSmbPropertiesList getSmbPropertiesToCopy()
Boolean isArchiveAttributeSet()
Boolean isIgnoreReadOnly()
ShareFileCopyOptions setArchiveAttribute(Boolean archiveAttribute)
ShareFileCopyOptions setDestinationRequestConditions(ShareRequestConditions requestConditions)

Sets the ShareRequestConditions to add conditions on copying the file.

ShareFileCopyOptions setFilePermission(String filePermissionKey)

Sets the file permission key.

ShareFileCopyOptions setIgnoreReadOnly(Boolean ignoreReadOnly)
ShareFileCopyOptions setMetadata(Map<String,String> metadata)
ShareFileCopyOptions setPermissionCopyModeType(PermissionCopyModeType copyModeType)
ShareFileCopyOptions setSmbProperties(FileSmbProperties smbProperties)
ShareFileCopyOptions setSmbPropertiesToCopy(CopyableFileSmbPropertiesList smbProperties)

Methods inherited from java.lang.Object

Constructor Details

ShareFileCopyOptions

public ShareFileCopyOptions()

Method Details

getDestinationRequestConditions

public ShareRequestConditions getDestinationRequestConditions()

Gets the ShareRequestConditions.

Returns:

getFilePermission

public String getFilePermission()

Returns:

The file's permission key.

getMetadata

public Map getMetadata()

Returns:

Metadata to associate with the share

getPermissionCopyModeType

public PermissionCopyModeType getPermissionCopyModeType()

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()

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()

Returns:

SMB properties to copy from the source file.

isArchiveAttributeSet

public Boolean isArchiveAttributeSet()

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()

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)

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.

setIgnoreReadOnly

public ShareFileCopyOptions setIgnoreReadOnly(Boolean ignoreReadOnly)

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)

Parameters:

metadata - Metadata to associate with the share. 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)

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)

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)

Parameters:

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

Returns:

The updated options.

Applies to