ShareFileCreateOptions Class
- java.
lang. Object - com.
azure. storage. file. share. options. ShareFileCreateOptions
- com.
public class ShareFileCreateOptions
Extended options that may be passed when creating a share.
Constructor Summary
| Constructor | Description |
|---|---|
| ShareFileCreateOptions(long size) |
Creates a new instance of ShareFileCreateOptions. |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
ShareFileCreateOptions
public ShareFileCreateOptions(long size)
Creates a new instance of ShareFileCreateOptions.
Parameters:
Method Details
getData
public 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:
getFilePermission
public String getFilePermission()
Gets the file permission.
Returns:
getFilePermissionFormat
public FilePermissionFormat getFilePermissionFormat()
Gets the file permission format.
Returns:
getFilePropertySemantics
public FilePropertySemantics 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:
getMetadata
public Map<String,String> getMetadata()
Gets the metadata to associate with the share.
Returns:
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:
getRequestConditions
getShareFileHttpHeaders
public ShareFileHttpHeaders getShareFileHttpHeaders()
Gets the file's http headers.
Returns:
getSize
public long getSize()
Gets the maximum size for the file share.
Returns:
getSmbProperties
public FileSmbProperties getSmbProperties()
Gets the optional SMB properties to set on the destination file or directory.
Returns:
setData
public ShareFileCreateOptions setData(BinaryData binaryData)
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:
Returns:
setFilePermission
public ShareFileCreateOptions setFilePermission(String filePermissionKey)
Sets the file permission.
Parameters:
Returns:
setFilePermissionFormat
public ShareFileCreateOptions setFilePermissionFormat(FilePermissionFormat filePermissionFormat)
Sets the file permission format.
Parameters:
Returns:
setFilePropertySemantics
public ShareFileCreateOptions setFilePropertySemantics(FilePropertySemantics filePropertySemantics)
Optional, only applicable to SMB files. Sets 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.
Parameters:
Returns:
setMetadata
public ShareFileCreateOptions setMetadata(Map<String,String> metadata)
Sets the metadata to associate with the share.
Parameters:
Returns:
setPosixProperties
public ShareFileCreateOptions setPosixProperties(FilePosixProperties posixProperties)
Optional properties to set on NFS files. Note that this property is only applicable to files created in NFS shares.
Parameters:
Returns:
setRequestConditions
public ShareFileCreateOptions setRequestConditions(ShareRequestConditions requestConditions)
Sets the ShareRequestConditions.
Parameters:
Returns:
setShareFileHttpHeaders
public ShareFileCreateOptions setShareFileHttpHeaders(ShareFileHttpHeaders headers)
Sets the file's http headers.
Parameters:
Returns:
setSmbProperties
public ShareFileCreateOptions setSmbProperties(FileSmbProperties smbProperties)
Sets the optional SMB properties to set on the destination file or directory.
Parameters:
Returns: