Questions on the NIO.2 API

Alan Bateman Alan.Bateman at
Mon Jan 31 08:45:05 PST 2011

Martijn Verburg wrote:
> :
> The FileStore object's type is simply a String as opposed to a 
> constant, enum or other defined type.  This makes it very hard to rely 
> on for decision making (as per the if statement I have above).  I 
> assume this is a limitation of being able to consistently detect the 
> underlying storage type?
The FileStore name and type are really meant for display/informational 
purposes. Say for example someone right clicks on the FileStore to look 
at its properties and is shows the name, type, capacity, and space 
available. Maybe we need to make this clearer in the javadoc. Do you 
have examples in mind where you might do something differently if the 
volume is NTFS or FAT or whatever? The only cases that we do handle is 
where you want to know if the file store supports certain file 
attributes or not, and you can query file store specific attributes.


More information about the nio-dev mailing list