Class ShareFileProperties

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

public final class ShareFileProperties extends Object
Contains property information about a File in the storage File service.
  • Constructor Details

    • ShareFileProperties

      public 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.
      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.
    • ShareFileProperties

      public 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.
      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.
  • Method Details

    • getETag

      public String getETag()
      Gets the entity tag that corresponds to the directory.
      Returns:
      Entity tag that corresponds to the directory.
    • getLastModified

      public OffsetDateTime getLastModified()
      Gets the last time the directory was modified.
      Returns:
      Last time the directory was modified.
    • getMetadata

      public Map<String,String> 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.
    • getContentLength

      public Long getContentLength()
      Gets the number of bytes present in the response body.
      Returns:
      The number of bytes present in the response body.
    • getFileType

      public String getFileType()
      Gets the type of the file.
      Returns:
      The type 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.
    • getContentMd5

      public byte[] getContentMd5()
      Gets the MD5 hash of the file.
      Returns:
      The MD5 hash of the file.
    • 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.
    • 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.
    • getLeaseStatus

      public LeaseStatusType getLeaseStatus()
      Gets the lease status of the file.
      Returns:
      the lease status of the file
    • getLeaseState

      public LeaseStateType getLeaseState()
      Gets the lease state of the file.
      Returns:
      the lease state of the file
    • getLeaseDuration

      public LeaseDurationType getLeaseDuration()
      Gets the lease duration if the file is leased.
      Returns:
      the lease duration if the file is leased
    • 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.
    • 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.
    • 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.
    • 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.
    • getSmbProperties

      public FileSmbProperties getSmbProperties()
      Gets the SMB properties of the file.
      Returns:
      The SMB properties of the file.
    • getPosixProperties

      public FilePosixProperties getPosixProperties()
      Gets the file's NFS properties. Only applicable to files in a NFS share.
      Returns:
      The NFS Properties of the file.