Package com.azure.storage.blob.nio
Class AzureBlobFileAttributes
java.lang.Object
com.azure.storage.blob.nio.AzureBlobFileAttributes
- All Implemented Interfaces:
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 TypeMethodDescriptionReturns the tier of the blob.Returns the time when the access tier for the blob was last changed or null if this is a virtual directory.Returns the archive status of the blob.Returns theBlobHttpHeaders
of the blob or null if this is a virtual directory.blobType()
Returns the type of the blob or null if this is a virtual directoryReturns the completion time of the last copy operation.copyId()
Returns the identifier of the last copy operation.Returns the number of bytes copied and total bytes in the source from the last copy operation (bytes copied/total bytes).Returns the source blob URL from the last copy operation.Returns the status of the last copy operation.Returns the description of the last copy failure, this is set when thegetCopyStatus
isfailed
oraborted
.Returns the creation time.eTag()
Returns the eTag of the blob or null if this is a virtual directoryfileKey()
Returns the url of the resource.Returns the status of the tier being inferred for the blob.boolean
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
Tells whether the file is a regular file with opaque content.Returns the status of the blob being encrypted on the server or null if this is a virtual directory.boolean
Tells whether the file is a symbolic link.boolean
Tells whether the file is a virtual directory.Returns the time of last modification or null if this is a virtual directory.Returns the time of last modification.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).
-
Method Details
-
creationTime
Returns the creation time. The creation time is the time that the file was created. Returns null if this is a virtual directory.- Specified by:
creationTime
in interfaceBasicFileAttributes
- Returns:
- The creation time or null if this is a virtual directory
-
lastModifiedTime
Returns the time of last modification. Returns null if this is a virtual directory- Specified by:
lastModifiedTime
in interfaceBasicFileAttributes
- Returns:
- the time of last modification or null if this is a virtual directory
-
eTag
Returns the eTag of the blob or null if this is a virtual directory- Returns:
- the eTag of the blob or null if this is a virtual directory
-
blobHttpHeaders
Returns theBlobHttpHeaders
of the blob or null if this is a virtual directory.- Returns:
BlobHttpHeaders
or null if this is a virtual directory
-
blobType
Returns the type of the blob or null if this is a virtual directory- Returns:
- the type of the blob or null if this is a virtual directory
-
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:
- the identifier of the last copy operation or null if this is a virtual directory
-
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:
- the status of the last copy operation or null if this is a virtual directory
-
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:
- the source blob URL from the last copy operation or null if this is a virtual directory
-
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:
- the number of bytes copied and total bytes in the source from the last copy operation null if this is a virtual directory
-
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:
- the completion time of the last copy operation or null if this is a virtual directory
-
copyStatusDescription
Returns the description of the last copy failure, this is set when thegetCopyStatus
isfailed
oraborted
. 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:
- the description of the last copy failure or null if this is a virtual directory
-
isServerEncrypted
Returns the status of the blob being encrypted on the server or null if this is a virtual directory.- Returns:
- the status of the blob being encrypted on the server or null if this is a virtual directory
-
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:
- the tier of the blob or null if this is a virtual directory
-
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:
- the status of the tier being inferred for the blob or null if this is a virtual directory
-
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:
- the archive status of the blob or null if this is a virtual directory
-
accessTierChangeTime
Returns the time when the access tier for the blob was last changed or null if this is a virtual directory.- Returns:
- the time when the access tier for the blob was last changed or null if this is a virtual directory
-
metadata
Returns the metadata associated with this blob or null if this is a virtual directory.- Returns:
- the metadata associated with this blob or null if this is a virtual directory
-
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()
.- Specified by:
lastAccessTime
in interfaceBasicFileAttributes
- Returns:
- the time of last modification or null if this is a virtual directory
-
isRegularFile
public boolean isRegularFile()Tells whether the file is a regular file with opaque content.- Specified by:
isRegularFile
in interfaceBasicFileAttributes
- Returns:
- whether the file is a regular file.
-
isDirectory
public boolean isDirectory()Tells whether the file is a directory.Will return true if the directory is a concrete or virtual directory. See
AzureFileSystemProvider.createDirectory(Path, FileAttribute[])
for more information on virtual and concrete directories.- Specified by:
isDirectory
in interfaceBasicFileAttributes
- Returns:
- whether the file is a directory
-
isVirtualDirectory
public boolean isVirtualDirectory()Tells whether the file is a virtual directory.See
AzureFileSystemProvider.createDirectory(Path, FileAttribute[])
for more information on virtual and concrete directories.- Returns:
- whether the file is a virtual directory
-
isSymbolicLink
public boolean isSymbolicLink()Tells whether the file is a symbolic link.- Specified by:
isSymbolicLink
in interfaceBasicFileAttributes
- Returns:
- false. Symbolic links are not supported.
-
isOther
public boolean isOther()Tells whether the file is something other than a regular file, directory, or symbolic link.- Specified by:
isOther
in interfaceBasicFileAttributes
- Returns:
- false. No other object types are supported.
-
size
public long size()Returns the size of the file (in bytes).- Specified by:
size
in interfaceBasicFileAttributes
- Returns:
- the size of the file
-
fileKey
Returns the url of the resource.- Specified by:
fileKey
in interfaceBasicFileAttributes
- Returns:
- The file key, which is the url.
-