@ParametersAreNonnullByDefault public abstract class FileStoreBase extends FileStore
FileStore
Notes:
FileStoreAttributeViews;Long.MAX_VALUE; as
discussed on nio-dev, this is a reasonable value to return when the file
store has no information on the actual size.FileStore| Modifier | Constructor and Description |
|---|---|
protected |
FileStoreBase(String name,
FileAttributesFactory factory,
boolean readOnly)
Alternate constructor
|
protected |
FileStoreBase(String name,
String type,
FileAttributesFactory factory,
boolean readOnly)
Main constructor
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String attribute) |
<V extends FileStoreAttributeView> |
getFileStoreAttributeView(Class<V> type) |
long |
getTotalSpace() |
long |
getUnallocatedSpace() |
long |
getUsableSpace() |
boolean |
isReadOnly() |
String |
name() |
boolean |
supportsFileAttributeView(Class<? extends FileAttributeView> type) |
boolean |
supportsFileAttributeView(String name) |
String |
type() |
protected FileStoreBase(String name, String type, FileAttributesFactory factory, boolean readOnly)
name - the name of the file storetype - the type of the file storefactory - the associated FileAttributesFactoryreadOnly - whether this filestore is read onlyprotected FileStoreBase(String name, FileAttributesFactory factory, boolean readOnly)
This constructor assumes that the name and type are the same; apart from that, all arguments are the same as for the other constructor.
name - the name (and type) of the file storefactory - the associated FileAttributesFactoryreadOnly - whether this filestore is read onlypublic final boolean isReadOnly()
isReadOnly in class FileStorepublic long getTotalSpace()
throws IOException
getTotalSpace in class FileStoreIOExceptionpublic long getUsableSpace()
throws IOException
getUsableSpace in class FileStoreIOExceptionpublic long getUnallocatedSpace()
throws IOException
getUnallocatedSpace in class FileStoreIOExceptionpublic final boolean supportsFileAttributeView(Class<? extends FileAttributeView> type)
supportsFileAttributeView in class FileStorepublic final boolean supportsFileAttributeView(String name)
supportsFileAttributeView in class FileStorepublic final <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> type)
getFileStoreAttributeView in class FileStorepublic final Object getAttribute(String attribute) throws IOException
getAttribute in class FileStoreIOException