共用方式為


ShareFileProperties Class

  • java.lang.Object
    • com.azure.storage.file.share.models.ShareFileProperties

public final class ShareFileProperties

Contains property information about a File in the storage File service.

Constructor Summary

Constructor Description
ShareFileProperties(String eTag, OffsetDateTime lastModified, Map<String,String> metadata, String fileType, Long contentLength, String contentType, byte[] contentMd5, String contentEncoding, String cacheControl, String contentDisposition, LeaseStatusType leaseStatusType, LeaseStateType leaseStateType, LeaseDurationType leaseDurationType, OffsetDateTime copyCompletionTime, String copyStatusDescription, String copyId, String copyProgress, String copySource, CopyStatusType copyStatus, Boolean isServerEncrypted, FileSmbProperties smbProperties)

Creates an instance of property information about a specific File.

ShareFileProperties(String eTag, OffsetDateTime lastModified, Map<String,String> metadata, String fileType, Long contentLength, String contentType, byte[] contentMd5, String contentEncoding, String cacheControl, String contentDisposition, OffsetDateTime copyCompletionTime, String copyStatusDescription, String copyId, String copyProgress, String copySource, CopyStatusType copyStatus, Boolean isServerEncrypted, FileSmbProperties smbProperties)

Creates an instance of property information about a specific File.

Method Summary

Modifier and Type Method and Description
String getCacheControl()

Gets the value that was specified for the Content-Encoding request header.

String getContentDisposition()

Gets the value that was specified for the x-ms-content-disposition header and specifies how to process the response.

String getContentEncoding()

Gets the value that was specified for the Content-Encoding request header.

Long getContentLength()

Gets the number of bytes present in the response body.

byte[] getContentMd5()

Gets the MD5 hash of the file.

String getContentType()

Gets the content type specified for the file.

OffsetDateTime getCopyCompletionTime()

Gets the conclusion time of the last attempted Copy File operation where this file was the destination file.

String getCopyId()

Gets the string identifier for the last attempted Copy File operation where this file was the destination file.

String getCopyProgress()

Gets the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file.

String getCopySource()

Gets the source file used in the last attempted Copy File operation where this file was the destination file.

CopyStatusType getCopyStatus()

Gets the state of the copy operation identified by x-ms-copy-id.

String getCopyStatusDescription()

Gets the cause of fatal or non-fatal copy operation failure.

String getETag()

Gets the entity tag that corresponds to the directory.

String getFileType()

Gets the type of the file.

OffsetDateTime getLastModified()

Gets the last time the directory was modified.

LeaseDurationType getLeaseDuration()

Gets the lease duration if the file is leased.

LeaseStateType getLeaseState()

Gets the lease state of the file.

LeaseStatusType getLeaseStatus()

Gets the lease status of the file.

Map<String,String> getMetadata()

Gets a set of name-value pairs associated with this file as user-defined metadata.

FileSmbProperties getSmbProperties()

Gets the SMB properties of the file.

Boolean isServerEncrypted()

Gets whether the file data and application metadata are completely encrypted using the specified algorithm.

Methods inherited from java.lang.Object

Constructor Details

ShareFileProperties

public ShareFileProperties(String eTag, OffsetDateTime lastModified, Map metadata, String fileType, Long contentLength, String contentType, byte[] contentMd5, String contentEncoding, String cacheControl, String contentDisposition, LeaseStatusType leaseStatusType, LeaseStateType leaseStateType, LeaseDurationType leaseDurationType, OffsetDateTime copyCompletionTime, String copyStatusDescription, String copyId, String copyProgress, String copySource, CopyStatusType copyStatus, Boolean isServerEncrypted, FileSmbProperties smbProperties)

Creates an instance of property information about a specific File.

Parameters:

eTag - Entity tag that corresponds to the directory.
lastModified - Last time the directory was modified.
metadata - A set of name-value pairs associated with this file as user-defined metadata.
fileType - Type of the file.
contentLength - The number of bytes present in the response body.
contentType - The content type specified for the file. The default content type is application/octet-stream.
contentMd5 - The MD5 hash of the file to check the message content integrity.
contentEncoding - This header returns the value that was specified for the Content-Encoding request header.
cacheControl - This header is returned if it was previously specified for the file.
contentDisposition - The value that was specified for the x-ms-content-disposition header and specifies how to process the response.
leaseStatusType - Status of the lease.
leaseStateType - State of the lease.
leaseDurationType - How long the lease has left.
copyCompletionTime - Conclusion time of the last attempted Copy File operation where this file was the destination file.
copyStatusDescription - Appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure.
copyId - String identifier for the last attempted Copy File operation where this file was the destination file.
copyProgress - Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file.
copySource - URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file.
copyStatus - State of the copy operation identified by x-ms-copy-id, with these values:
  • success: Copy completed successfully
  • pending: Copy is in progress. Check x-ms-copy-status-description if intermittent, non-fatal errors impede copy progress but don't cause failure.
  • aborted: Copy was ended by Abort Copy File.
  • failed: Copy failed. See x-ms-copy-status-description for failure details.
isServerEncrypted - The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false.
smbProperties - The SMB properties of the file.

ShareFileProperties

public ShareFileProperties(String eTag, OffsetDateTime lastModified, Map metadata, String fileType, Long contentLength, String contentType, byte[] contentMd5, String contentEncoding, String cacheControl, String contentDisposition, OffsetDateTime copyCompletionTime, String copyStatusDescription, String copyId, String copyProgress, String copySource, CopyStatusType copyStatus, Boolean isServerEncrypted, FileSmbProperties smbProperties)

Creates an instance of property information about a specific File.

Parameters:

eTag - Entity tag that corresponds to the directory.
lastModified - Last time the directory was modified.
metadata - A set of name-value pairs associated with this file as user-defined metadata.
fileType - Type of the file.
contentLength - The number of bytes present in the response body.
contentType - The content type specified for the file. The default content type is application/octet-stream.
contentMd5 - The MD5 hash of the file to check the message content integrity.
contentEncoding - This header returns the value that was specified for the Content-Encoding request header.
cacheControl - This header is returned if it was previously specified for the file.
contentDisposition - The value that was specified for the x-ms-content-disposition header and specifies how to process the response.
copyCompletionTime - Conclusion time of the last attempted Copy File operation where this file was the destination file.
copyStatusDescription - Appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure.
copyId - String identifier for the last attempted Copy File operation where this file was the destination file.
copyProgress - Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file.
copySource - URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file.
copyStatus - State of the copy operation identified by x-ms-copy-id, with these values:
  • success: Copy completed successfully
  • pending: Copy is in progress. Check x-ms-copy-status-description if intermittent, non-fatal errors impede copy progress but don't cause failure.
  • aborted: Copy was ended by Abort Copy File.
  • failed: Copy failed. See x-ms-copy-status-description for failure details.
isServerEncrypted - The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false.
smbProperties - The SMB properties of the file.

Method Details

getCacheControl

public String getCacheControl()

Gets the value that was specified for the Content-Encoding request header.

Returns:

This header is returned if it was previously specified for the file.

getContentDisposition

public String getContentDisposition()

Gets the value that was specified for the x-ms-content-disposition header and specifies how to process the response.

Returns:

The value that was specified for the x-ms-content-disposition header and specifies how to process the response.

getContentEncoding

public String getContentEncoding()

Gets the value that was specified for the Content-Encoding request header.

Returns:

The value that was specified for the Content-Encoding request header.

getContentLength

public Long getContentLength()

Gets the number of bytes present in the response body.

Returns:

The number of bytes present in the response body.

getContentMd5

public byte[] getContentMd5()

Gets the MD5 hash of the file.

Returns:

The MD5 hash of the file.

getContentType

public String getContentType()

Gets the content type specified for the file. The default content type is application/octet-stream.

Returns:

The content type specified for the file. The default content type is application/octet-stream.

getCopyCompletionTime

public OffsetDateTime getCopyCompletionTime()

Gets the conclusion time of the last attempted Copy File operation where this file was the destination file.

Returns:

Conclusion time of the last attempted Copy File operation where this file was the destination file.

getCopyId

public String getCopyId()

Gets the string identifier for the last attempted Copy File operation where this file was the destination file.

Returns:

String identifier for the last attempted Copy File operation where this file was the destination file.

getCopyProgress

public String getCopyProgress()

Gets the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file.

Returns:

The number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file.

getCopySource

public String getCopySource()

Gets the source file used in the last attempted Copy File operation where this file was the destination file.

Returns:

URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file.

getCopyStatus

public CopyStatusType getCopyStatus()

Gets the state of the copy operation identified by x-ms-copy-id.

Returns:

State of the copy operation identified by x-ms-copy-id, with these values: - success: Copy completed successfully. - pending: Copy is in progress. Check x-ms-copy-status-description if intermittent, non-fatal errors impede copy progress but don't cause failure. - aborted: Copy was ended by Abort Copy File. - failed: Copy failed. See x-ms-copy-status-description for failure details.

getCopyStatusDescription

public String getCopyStatusDescription()

Gets the cause of fatal or non-fatal copy operation failure.

Returns:

When x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure.

getETag

public String getETag()

Gets the entity tag that corresponds to the directory.

Returns:

Entity tag that corresponds to the directory.

getFileType

public String getFileType()

Gets the type of the file.

Returns:

The type of the file.

getLastModified

public OffsetDateTime getLastModified()

Gets the last time the directory was modified.

Returns:

Last time the directory was modified.

getLeaseDuration

public LeaseDurationType getLeaseDuration()

Gets the lease duration if the file is leased.

Returns:

the lease duration if the file is leased

getLeaseState

public LeaseStateType getLeaseState()

Gets the lease state of the file.

Returns:

the lease state of the file

getLeaseStatus

public LeaseStatusType getLeaseStatus()

Gets the lease status of the file.

Returns:

the lease status of the file

getMetadata

public Map getMetadata()

Gets a set of name-value pairs associated with this file as user-defined metadata.

Returns:

A set of name-value pairs associated with this file as user-defined metadata.

getSmbProperties

public FileSmbProperties getSmbProperties()

Gets the SMB properties of the file.

Returns:

The SMB properties of the file.

isServerEncrypted

public Boolean isServerEncrypted()

Gets whether the file data and application metadata are completely encrypted using the specified algorithm.

Returns:

True if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, return false.

Applies to