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.

ModeCopyMode getModeCopyMode()

Optional properties to set on NFS files.

OwnerCopyMode getOwnerCopyMode()

Optional properties to set on NFS files.

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.

FilePosixProperties getPosixProperties()

Optional properties to set on NFS files.

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 setModeCopyMode(ModeCopyMode modeCopyMode)

Optional properties to set on NFS files.

ShareFileCopyOptions setOwnerCopyMode(OwnerCopyMode ownerCopyMode)

Optional properties to set on NFS files.

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 setPosixProperties(FilePosixProperties posixProperties)

Optional properties to set on NFS files.

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.

getModeCopyMode

public ModeCopyMode getModeCopyMode()

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares. If not populated, the destination file will have the default File Mode.

Returns:

The destination file's FileMode.

getOwnerCopyMode

public OwnerCopyMode getOwnerCopyMode()

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares. If not populated,the destination file will have the default Owner and Group.

Returns:

The destination file's Owner and Group.

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.

getPosixProperties

public FilePosixProperties getPosixProperties()

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares.

Returns:

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.

setModeCopyMode

public ShareFileCopyOptions setModeCopyMode(ModeCopyMode modeCopyMode)

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares. If not populated, the destination file will have the default File Mode.

Parameters:

modeCopyMode - The destination file's FileMode.

Returns:

The updated options.

setOwnerCopyMode

public ShareFileCopyOptions setOwnerCopyMode(OwnerCopyMode ownerCopyMode)

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares. If not populated,the destination file will have the default Owner and Group.

Parameters:

ownerCopyMode - The destination file's Owner and Group.

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.

setPosixProperties

public ShareFileCopyOptions setPosixProperties(FilePosixProperties posixProperties)

Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares.

Parameters:

posixProperties - FilePosixProperties

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