public final class DropBoxFileStore
extends com.github.fge.filesystem.filestore.FileStoreBase
FileStore
This makes use of information available in DbxAccountInfo.Quota.
Information is computed in "real time".
| Constructor and Description |
|---|
DropBoxFileStore(DbxClient client)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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 |
supportsFileAttributeView(Class<? extends FileAttributeView> type)
Tells whether or not this file store supports the file attributes
identified by the given file attribute view.
|
boolean |
supportsFileAttributeView(String name)
Tells whether or not this file store supports the file attributes
identified by the given file attribute view.
|
public DropBoxFileStore(DbxClient client)
client - the (valid) DropBox client to usepublic long getTotalSpace()
throws IOException
getTotalSpace in class FileStoreIOException - if an I/O error occurspublic long getUsableSpace()
throws IOException
The returned number of available bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of usable bytes is most likely to be accurate immediately after the space attributes are obtained. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this Java virtual machine.
getUsableSpace in class FileStoreIOException - if an I/O error occurspublic long getUnallocatedSpace()
throws IOException
The returned number of unallocated bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of unallocated bytes is most likely to be accurate immediately after the space attributes are obtained. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this virtual machine.
getUnallocatedSpace in class FileStoreIOException - if an I/O error occurspublic boolean supportsFileAttributeView(Class<? extends FileAttributeView> type)
Invoking this method to test if the file store supports BasicFileAttributeView will always return true. In the case of
the default provider, this method cannot guarantee to give the correct
result when the file store is not a local storage device. The reasons for
this are implementation specific and therefore unspecified.
supportsFileAttributeView in class FileStoretype - the file attribute view typetrue if, and only if, the file attribute view is
supportedpublic boolean supportsFileAttributeView(String name)
Invoking this method to test if the file store supports BasicFileAttributeView, identified by the name "basic" will
always return true. In the case of the default provider, this
method cannot guarantee to give the correct result when the file store is
not a local storage device. The reasons for this are implementation
specific and therefore unspecified.
supportsFileAttributeView in class FileStorename - the name of file attribute
viewtrue if, and only if, the file attribute view is
supported