AzureBlobFileAttributes Class
- java.
lang. Object - com.
azure. storage. blob. nio. AzureBlobFileAttributes
- com.
Implements
public final class AzureBlobFileAttributes
implements BasicFileAttributes
Provides support for attributes associated with a file stored as a blob in Azure Storage.
Some of the attributes inherited from BasicFileAttributes are not supported. See the docs on each method for more information.
If the target file is a virtual directory, most attributes will be set to null.
Method Summary
Modifier and Type | Method and Description |
---|---|
Access |
accessTier()
Returns the tier of the blob. |
Offset |
accessTierChangeTime()
Returns the time when the access tier for the blob was last changed or null if this is a virtual directory. |
Archive |
archiveStatus()
Returns the archive status of the blob. |
Blob |
blobHttpHeaders()
Returns the BlobHttpHeaders of the blob or null if this is a virtual directory. |
Blob |
blobType()
Returns the type of the blob or null if this is a virtual directory |
Offset |
copyCompletionTime()
Returns the completion time of the last copy operation. |
String |
copyId()
Returns the identifier of the last copy operation. |
String |
copyProgress()
Returns the number of bytes copied and total bytes in the source from the last copy operation (bytes copied/total bytes). |
String |
copySource()
Returns the source blob URL from the last copy operation. |
Copy |
copyStatus()
Returns the status of the last copy operation. |
String |
copyStatusDescription()
Returns the description of the last copy failure, this is set when the copyStatus() is FAILED or ABORTED. |
File |
creationTime()
Returns the creation time. |
String |
eTag()
Returns the e |
Object |
fileKey()
Returns the url of the resource. |
Boolean |
isAccessTierInferred()
Returns the status of the tier being inferred for the blob. |
boolean |
isDirectory()
Tells whether the file is a directory. |
boolean |
isOther()
Tells whether the file is something other than a regular file, directory, or symbolic link. |
boolean |
isRegularFile()
Tells whether the file is a regular file with opaque content. |
Boolean |
isServerEncrypted()
Returns the status of the blob being encrypted on the server or null if this is a virtual directory. |
boolean |
isSymbolicLink()
Tells whether the file is a symbolic link. |
boolean |
isVirtualDirectory()
Tells whether the file is a virtual directory. |
File |
lastAccessTime()
Returns the time of last modification or null if this is a virtual directory. |
File |
lastModifiedTime()
Returns the time of last modification. |
Map<String,String> |
metadata()
Returns the metadata associated with this blob or null if this is a virtual directory. |
long |
size()
Returns the size of the file (in bytes). |
Methods inherited from java.lang.Object
Method Details
accessTier
public AccessTier accessTier()
Returns the tier of the blob. This is only set for Page blobs on a premium storage account or for Block blobs on blob storage or general purpose V2 account. Returns null if this is a virtual directory.
Returns:
accessTierChangeTime
public OffsetDateTime accessTierChangeTime()
Returns the time when the access tier for the blob was last changed or null if this is a virtual directory.
Returns:
archiveStatus
public ArchiveStatus archiveStatus()
Returns the archive status of the blob. This is only for blobs on a blob storage and general purpose v2 account. Returns null if this is a virtual directory.
Returns:
blobHttpHeaders
public BlobHttpHeaders blobHttpHeaders()
Returns the BlobHttpHeaders of the blob or null if this is a virtual directory.
Returns:
blobType
public BlobType blobType()
Returns the type of the blob or null if this is a virtual directory
Returns:
copyCompletionTime
public OffsetDateTime copyCompletionTime()
Returns the completion time of the last copy operation. If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory.
Returns:
copyId
public String copyId()
Returns the identifier of the last copy operation. If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory
Returns:
copyProgress
public String copyProgress()
Returns the number of bytes copied and total bytes in the source from the last copy operation (bytes copied/total bytes). If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory
Returns:
copySource
public String copySource()
Returns the source blob URL from the last copy operation. If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory
Returns:
copyStatus
public CopyStatusType copyStatus()
Returns the status of the last copy operation. If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory
Returns:
copyStatusDescription
public String copyStatusDescription()
Returns the description of the last copy failure, this is set when the copyStatus() is FAILED or ABORTED. If this blob hasn't been the target of a copy operation or has been modified since this won't be set. Returns null if this is a virtual directory.
Returns:
creationTime
public FileTime creationTime()
Returns the creation time. The creation time is the time that the file was created. Returns null if this is a virtual directory.
Returns:
eTag
public String eTag()
Returns the eTag of the blob or null if this is a virtual directory
Returns:
fileKey
public Object fileKey()
Returns the url of the resource.
Returns:
isAccessTierInferred
public Boolean isAccessTierInferred()
Returns the status of the tier being inferred for the blob. This is only set for Page blobs on a premium storage account or for Block blobs on blob storage or general purpose V2 account. Returns null if this is a virtual directory.
Returns:
isDirectory
public boolean isDirectory()
Tells whether the file is a directory.
Will return true if the directory is a concrete or virtual directory. See createDirectory(Path path, FileAttribute<?>[] fileAttributes) for more information on virtual and concrete directories.
Returns:
isOther
public boolean isOther()
Tells whether the file is something other than a regular file, directory, or symbolic link.
Returns:
isRegularFile
public boolean isRegularFile()
Tells whether the file is a regular file with opaque content.
Returns:
isServerEncrypted
public Boolean isServerEncrypted()
Returns the status of the blob being encrypted on the server or null if this is a virtual directory.
Returns:
isSymbolicLink
public boolean isSymbolicLink()
Tells whether the file is a symbolic link.
Returns:
isVirtualDirectory
public boolean isVirtualDirectory()
Tells whether the file is a virtual directory.
See createDirectory(Path path, FileAttribute<?>[] fileAttributes) for more information on virtual and concrete directories.
Returns:
lastAccessTime
public FileTime lastAccessTime()
Returns the time of last modification or null if this is a virtual directory.
Last access time is not supported by the blob service. In this case, it is typical for implementations to return the lastModifiedTime().
Returns:
lastModifiedTime
public FileTime lastModifiedTime()
Returns the time of last modification. Returns null if this is a virtual directory
Returns:
metadata
public Map
Returns the metadata associated with this blob or null if this is a virtual directory.
Returns:
size
public long size()
Returns the size of the file (in bytes).
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for