Class AzureBasicFileAttributes
- All Implemented Interfaces:
BasicFileAttributes
The properties available on this type are a strict subset of AzureBlobFileAttributes, and the two types have
the same network behavior. Therefore, while this type is offered for compliance with the NIO spec,
AzureBlobFileAttributes is generally preferred.
Some attributes are not supported. Refer to the javadocs 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 creation time.fileKey()Returns the url of the resource.booleanTells whether the file is a directory.booleanisOther()Tells whether the file is something other than a regular file, directory, or symbolic link.booleanTells whether the file is a regular file with opaque content.booleanTells whether the file is a symbolic link.booleanTells whether the file is a virtual directory.Returns the time of last modification or null if this is a virtual directoryReturns the time of last modification or null if this is a virtual directory.longsize()Returns the size of the file (in bytes).
-
Method Details
-
lastModifiedTime
Returns the time of last modification or null if this is a virtual directory.- Specified by:
lastModifiedTimein interfaceBasicFileAttributes- Returns:
- the time of last modification or null if this is a virtual directory
-
lastAccessTime
Returns the time of last modification or null if this is a virtual directoryLast access time is not supported by the blob service. In this case, it is typical for implementations to return the
lastModifiedTime().- Specified by:
lastAccessTimein interfaceBasicFileAttributes- Returns:
- the time of last modification or null if this is a virtual directory
-
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:
creationTimein interfaceBasicFileAttributes- Returns:
- The creation time 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:
isRegularFilein interfaceBasicFileAttributes- Returns:
- whether the file is a regular file.
-
isDirectory
public boolean isDirectory()Tells whether the file is a directory.Will only return true if the directory is a concrete directory. See
AzureFileSystemProvider.createDirectory(Path, FileAttribute[])for more information on virtual and concrete directories.- Specified by:
isDirectoryin 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:
isSymbolicLinkin 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:
isOtherin interfaceBasicFileAttributes- Returns:
- false. No other object types are supported.
-
size
public long size()Returns the size of the file (in bytes).- Specified by:
sizein interfaceBasicFileAttributes- Returns:
- the size of the file
-
fileKey
Returns the url of the resource.- Specified by:
fileKeyin interfaceBasicFileAttributes- Returns:
- The file key, which is the url.
-