public ShareFileRenameOptions(String destinationPath)
Creates a ShareFileRenameOptions object.
Parameters:
destinationPath
- Relative path from the share to rename the file to.
Method Details
getContentType
public String getContentType()
Gets the content type.
Returns:
The content type.
getDestinationPath
public String getDestinationPath()
Returns:
The path to which the file should be renamed.
getDestinationRequestConditions
public ShareRequestConditions getDestinationRequestConditions()
Returns:
The destination request conditions.
getFilePermission
public String getFilePermission()
Returns:
Optional file permission to set on the destination file or directory. The value in SmbProperties will be
ignored.
getFilePermissionFormat
public FilePermissionFormat getFilePermissionFormat()
Gets the file permission format.
Returns:
The file permission format.
getMetadata
public Map getMetadata()
Returns:
The metadata to associate with the renamed file.
getReplaceIfExists
public Boolean getReplaceIfExists()
Returns:
A boolean value which, if the destination file already exists, determines whether this
request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file.
If not provided or if false and the destination file does exist, the request will not overwrite the destination
file. If provided and the destination file doesn\u2019t exist, the rename will succeed.
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.
getSourceRequestConditions
public ShareRequestConditions getSourceRequestConditions()
Returns:
Source request conditions. This parameter is only applicable if the source is a file.
isIgnoreReadOnly
public Boolean isIgnoreReadOnly()
Returns:
A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be
respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly
attribute set will cause the rename to fail.
setContentType
public ShareFileRenameOptions setContentType(String contentType)
Sets the content type.
Parameters:
contentType
- the content type.
Returns:
The updated options.
setDestinationRequestConditions
public ShareFileRenameOptions setDestinationRequestConditions(ShareRequestConditions destinationRequestConditions)
Parameters:
destinationRequestConditions
- The destination request conditions.
Returns:
The updated options.
setFilePermission
public ShareFileRenameOptions setFilePermission(String filePermission)
Parameters:
filePermission
- Optional file permission to set on the destination file or directory. The value in
SmbProperties will be ignored.
Returns:
The updated options.
setFilePermissionFormat
public ShareFileRenameOptions setFilePermissionFormat(FilePermissionFormat filePermissionFormat)
Sets the file permission format.
Parameters:
filePermissionFormat
- the file permission format.
Returns:
The updated options.
setIgnoreReadOnly
public ShareFileRenameOptions setIgnoreReadOnly(Boolean ignoreReadOnly)
Parameters:
ignoreReadOnly
- A boolean value that specifies whether the ReadOnly attribute on a preexisting destination
file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with
the ReadOnly attribute set will cause the rename to fail.
Returns:
The updated options.
setMetadata
public ShareFileRenameOptions setMetadata(Map metadata)
Parameters:
metadata
- The metadata to associate with the renamed file.
Returns:
The updated options.
setReplaceIfExists
public ShareFileRenameOptions setReplaceIfExists(Boolean replaceIfExists)
Parameters:
replaceIfExists
- A boolean value which, if the destination file already exists, determines whether this
request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file.
If not provided or if false and the destination file does exist, the request will not overwrite the destination
file. If provided and the destination file doesn\u2019t exist, the rename will succeed.
Returns:
The updated options.
setSmbProperties
public ShareFileRenameOptions 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.
setSourceRequestConditions
public ShareFileRenameOptions setSourceRequestConditions(ShareRequestConditions sourceRequestConditions)
Parameters:
sourceRequestConditions
- Source request conditions. This parameter is only applicable if the source is a
file.
Returns:
The updated options.
Applies to
Colabore connosco no GitHub
A origem deste conteúdo pode ser encontrada no GitHub, onde também pode criar e rever problemas e pedidos Pull. Para mais informações, consulte o nosso guia do contribuidor.