Condividi tramite


AzureBlobFileAttributeView Class

  • java.lang.Object
    • com.azure.storage.blob.nio.AzureBlobFileAttributeView

Implements

public final class AzureBlobFileAttributeView
implements BasicFileAttributeView

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 lastModifiedTime, FileTime lastAccessTime, FileTime createTime) is not supported.

Method Summary

Modifier and Type Method and Description
String name()

Returns the name of the attribute view: "azureBlob"

AzureBlobFileAttributes readAttributes()

Reads the file attributes as a bulk operation.

void setBlobHttpHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders as an atomic operation.

void setMetadata(Map<String,String> metadata)

Sets the metadata as an atomic operation.

void setTier(AccessTier tier)

Sets the AccessTier on the file.

void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime)

Unsupported.

Methods inherited from java.lang.Object

Method Details

name

public String name()

Returns the name of the attribute view: "azureBlob"

Returns:

the name of the attribute view: "azureBlob"

readAttributes

public AzureBlobFileAttributes 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.

Returns:

Throws:

IOException

- if an IOException occurs.

setBlobHttpHeaders

public void setBlobHttpHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders as an atomic operation.

See BlobClientBase#setHttpHeaders(BlobHttpHeaders) for more information.

Parameters:

headers - BlobHttpHeaders

Throws:

IOException

- if an IOException occurs.

setMetadata

public void setMetadata(Map<String,String> metadata)

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

public void setTier(AccessTier tier)

Sets the AccessTier 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)

Unsupported.

Parameters:

lastModifiedTime - the new last modified time, or null to not change the value
lastAccessTime - the last access time, or null to not change the value
createTime - the file's create time, or null to not change the value

Throws:

IOException

- Operation not supported.

Applies to