Class ShareFileCreateOptions
java.lang.Object
com.azure.storage.file.share.options.ShareFileCreateOptions
Extended options that may be passed when creating a share.
-
Constructor Summary
ConstructorsConstructorDescriptionShareFileCreateOptions(long size) Creates a new instance ofShareFileCreateOptions. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.BinaryDatagetData()Optional, valid for version 2026-02-06 and later.Gets the file permission.Gets the file permission format.Optional, only applicable to SMB files.Gets the metadata to associate with the share.Optional properties to set on NFS files.Gets theShareRequestConditions.Gets the file's http headers.longgetSize()Gets the maximum size for the file share.Gets the optional SMB properties to set on the destination file or directory.setData(com.azure.core.util.BinaryData binaryData) Optional, valid for version 2026-02-06 and later.setFilePermission(String filePermissionKey) Sets the file permission.setFilePermissionFormat(FilePermissionFormat filePermissionFormat) Sets the file permission format.setFilePropertySemantics(FilePropertySemantics filePropertySemantics) Optional, only applicable to SMB files.setMetadata(Map<String, String> metadata) Sets the metadata to associate with the share.setPosixProperties(FilePosixProperties posixProperties) Optional properties to set on NFS files.setRequestConditions(ShareRequestConditions requestConditions) Sets theShareRequestConditions.Sets the file's http headers.setSmbProperties(FileSmbProperties smbProperties) Sets the optional SMB properties to set on the destination file or directory.
-
Constructor Details
-
ShareFileCreateOptions
public ShareFileCreateOptions(long size) Creates a new instance ofShareFileCreateOptions.- Parameters:
size- Specifies the maximum size for the file share.
-
-
Method Details
-
getSize
public long getSize()Gets the maximum size for the file share.- Returns:
- Specifies the maximum size for the file share.
-
getSmbProperties
Gets the optional SMB properties to set on the destination file or directory.- 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.
-
getMetadata
-
setMetadata
Sets the metadata to associate with the share.- 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.
-
getRequestConditions
Gets theShareRequestConditions.- Returns:
ShareRequestConditions
-
getFilePermission
-
setFilePermission
Sets the file permission.- Parameters:
filePermissionKey- the file permission.- Returns:
- The updated options.
-
getFilePermissionFormat
Gets the file permission format.- Returns:
- file permission format.
-
getPosixProperties
Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares.- Returns:
FilePosixProperties
-
getFilePropertySemantics
Optional, only applicable to SMB files. Gets how attributes and permissions should be set on the file. New: automatically adds the ARCHIVE file attribute flag to the file and uses Windows create file permissions semantics (ex: inherit from parent). Restore: does not modify file attribute flag and uses Windows update file permissions semantics. If Restore is specified, the file permission must also be provided, otherwise PropertySemantics will default to New.- Returns:
FilePropertySemantics
-
getData
public com.azure.core.util.BinaryData getData()Optional, valid for version 2026-02-06 and later. Gets the content to upload to the file when it is created. Must be less than or equal to 4 MiB in size.- Returns:
- The
BinaryData.
-
setData
Optional, valid for version 2026-02-06 and later. Sets the content to upload to the file when it is created. Must be less than or equal to 4 MiB in size.- Parameters:
binaryData- TheBinaryData.- Returns:
- The updated options.
-