Class AzureBlobFileAttributeView
java.lang.Object
com.azure.storage.blob.nio.AzureBlobFileAttributeView
- All Implemented Interfaces:
AttributeView, BasicFileAttributeView, FileAttributeView
A file attribute view that provides a view of attributes specific to files stored as blobs in Azure Storage.
All attributes are retrieved from the file system as a bulk operation.
setTimes(FileTime, FileTime, FileTime) is not supported.
-
Method Summary
Modifier and TypeMethodDescriptionname()Returns the name of the attribute view:"azureBlob"Reads the file attributes as a bulk operation.voidsetBlobHttpHeaders(BlobHttpHeaders headers) Sets theBlobHttpHeadersas an atomic operation.voidsetMetadata(Map<String, String> metadata) Sets the metadata as an atomic operation.voidsetTier(AccessTier tier) Sets theAccessTieron the file.voidUnsupported.
-
Method Details
-
name
Returns the name of the attribute view:"azureBlob"- Specified by:
namein interfaceAttributeView- Specified by:
namein interfaceBasicFileAttributeView- Returns:
- the name of the attribute view:
"azureBlob"
-
readAttributes
Reads the file attributes as a bulk operation.All file attributes are read as an atomic operation with respect to other file system operations. A fresh copy is retrieved every time this method is called.
- Specified by:
readAttributesin interfaceBasicFileAttributeView- Returns:
AzureBlobFileAttributes- Throws:
IOException- if an IOException occurs.
-
setBlobHttpHeaders
Sets theBlobHttpHeadersas an atomic operation.See
BlobClientBase.setHttpHeaders(BlobHttpHeaders)for more information.- Parameters:
headers-BlobHttpHeaders- Throws:
IOException- if an IOException occurs.
-
setMetadata
Sets the metadata as an atomic operation.See
BlobClientBase.setMetadata(Map)for more information.- Parameters:
metadata- The metadata to associate with the blob- Throws:
IOException- if an IOException occurs.
-
setTier
Sets theAccessTieron the file.See
BlobClientBase.setAccessTier(AccessTier)for more information.- Parameters:
tier-AccessTier- Throws:
IOException- if an IOException occurs.
-
setTimes
public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException Unsupported.- Specified by:
setTimesin interfaceBasicFileAttributeView- Parameters:
lastModifiedTime- the new last modified time, or null to not change the valuelastAccessTime- the last access time, or null to not change the valuecreateTime- the file's create time, or null to not change the value- Throws:
UnsupportedOperationException- Operation not supported.IOException- never
-