Class AzureFileStore
- java.lang.Object
-
- java.nio.file.FileStore
-
- com.azure.storage.blob.nio.AzureFileStore
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAttribute(String s)
Unsupported.<V extends FileStoreAttributeView>
VgetFileStoreAttributeView(Class<V> aClass)
Returns a FileStoreAttributeView of the given type.long
getTotalSpace()
Returns the size, in bytes, of the file store.long
getUnallocatedSpace()
Returns the number of unallocated bytes in the file store.long
getUsableSpace()
Returns the number of bytes available to this Java virtual machine on the file store.boolean
isReadOnly()
Always returns false.String
name()
Returns the name of the container that underlies this file store.boolean
supportsFileAttributeView(Class<? extends FileAttributeView> type)
Tells whether this file store supports the file attributes identified by the given file attribute view.boolean
supportsFileAttributeView(String name)
Tells whether this file store supports the file attributes identified by the given file attribute view.String
type()
Returns theString "AzureBlobContainer"
to indicate that the file store is backed by a remote blob container in Azure Storage.-
Methods inherited from class java.nio.file.FileStore
getBlockSize
-
-
-
-
Method Detail
-
name
public String name()
Returns the name of the container that underlies this file store.
-
type
public String type()
Returns theString "AzureBlobContainer"
to indicate that the file store is backed by a remote blob container in Azure Storage.
-
isReadOnly
public boolean isReadOnly()
Always returns false.It may be the case that the authentication method provided to this file system only supports read operations and hence the file store is implicitly read only in this view, but that does not imply the underlying container/file store is inherently read only. Creating/specifying read only file stores is not currently supported.
- Specified by:
isReadOnly
in classFileStore
- Returns:
- false.
-
getTotalSpace
public long getTotalSpace() throws IOException
Returns the size, in bytes, of the file store.Containers do not limit the amount of data stored. This method will always return max long.
- Specified by:
getTotalSpace
in classFileStore
- Returns:
- the size of the file store.
- Throws:
IOException
- If an I/O error occurs.
-
getUsableSpace
public long getUsableSpace() throws IOException
Returns the number of bytes available to this Java virtual machine on the file store.Containers do not limit the amount of data stored. This method will always return max long.
- Specified by:
getUsableSpace
in classFileStore
- Returns:
- the number of bytes available on the file store.
- Throws:
IOException
- If an I/O error occurs.
-
getUnallocatedSpace
public long getUnallocatedSpace() throws IOException
Returns the number of unallocated bytes in the file store.Containers do not limit the amount of data stored. This method will always return max long.
- Specified by:
getUnallocatedSpace
in classFileStore
- Returns:
- the number of unallocated bytes in the file store.
- Throws:
IOException
- If an I/O error occurs.
-
supportsFileAttributeView
public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type)
Tells whether this file store supports the file attributes identified by the given file attribute view.All file stores in this file system support the following views:
- Specified by:
supportsFileAttributeView
in classFileStore
- Parameters:
type
- the file attribute view type- Returns:
- Whether the file attribute view is supported.
-
supportsFileAttributeView
public boolean supportsFileAttributeView(String name)
Tells whether this file store supports the file attributes identified by the given file attribute view.All file stores in this file system support the following views:
- Specified by:
supportsFileAttributeView
in classFileStore
- Parameters:
name
- the name of the file attribute view- Returns:
- whether the file attribute view is supported.
-
getFileStoreAttributeView
public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> aClass)
Returns a FileStoreAttributeView of the given type.This method always returns null as no
FileStoreAttributeView
is currently supported.- Specified by:
getFileStoreAttributeView
in classFileStore
- Parameters:
aClass
- a class- Returns:
- null
-
getAttribute
public Object getAttribute(String s) throws IOException
Unsupported.This method always throws an
UnsupportedOperationException
as noFileStoreAttributeView
is currently supported.- Specified by:
getAttribute
in classFileStore
- Parameters:
s
- a string- Returns:
- The attribute value.
- Throws:
UnsupportedOperationException
- unsupportedIOException
- never
-
-