FileSystem interface

Alan Bateman Alan.Bateman at Sun.COM
Tue Sep 22 06:06:05 PDT 2009


Avinash Lakshman wrote:
> Hi All
>
> Could someone point me to any good usage of the FileSystem interface 
> in NIO2? In short I am interested in learning how and where it can be 
> useful. One thing I think it could be useful for is in building a 
> virtual file system. But any examples would make me get my feet wet 
> faster.
>
> THanks
> Avinash
If you are looking for sample code then there is a "zip" provider 
(developed by Rajendra Gutupalli) that treats the contents of a zip/JAR 
file as a read-only file system. It's just a prototype and if someone 
gets time to work on it, it could included in jdk7 as a demo provider. 
You can grab the code from the nio repository (or the 
demo/nio/ZipFileSystem directory if you have one of the snapshot 
builds). It has a README here:
   
http://hg.openjdk.java.net/nio/nio/jdk/file/tip/src/share/demo/nio/ZipFileSystem/README.txt

There are many other ideas for file system providers. So what type of 
file system provider are you interested in?

-Alan.











More information about the nio-discuss mailing list