Package com.azure.storage.blob.nio
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.void
setBlobHttpHeaders
(BlobHttpHeaders headers) Sets theBlobHttpHeaders
as an atomic operation.void
setMetadata
(Map<String, String> metadata) Sets the metadata as an atomic operation.void
setTier
(AccessTier tier) Sets theAccessTier
on the file.void
Unsupported.
-
Method Details
-
name
Returns the name of the attribute view:"azureBlob"
- Specified by:
name
in interfaceAttributeView
- Specified by:
name
in 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:
readAttributes
in interfaceBasicFileAttributeView
- Returns:
AzureBlobFileAttributes
- Throws:
IOException
- if an IOException occurs.
-
setBlobHttpHeaders
Sets theBlobHttpHeaders
as 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 theAccessTier
on 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:
setTimes
in 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
-