You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by akapur <An...@sophia.inria.fr> on 2008/11/07 10:13:02 UTC

Defining and Adding a new provider to the apache VFS api

Hi,

I am using apache VFS api to create a virtual data space for our software.

I need to know how to define and add a new provider to the api? I mean 
which classes do I need to extend and implement to create a new provider?

This provider does not depend upon any specific protocol.



~Ankush

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


RE: Defining and Adding a new provider to the apache VFS api

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!

> I need to know how to define and add a new provider to the api? I mean
> which classes do I need to extend and implement to create a new
> provider?

Have a look at the VFS sandbox and e.g. the mime or webdav provider.

Base directory:
vfs\sandbox\src\main\java\org\apache\commons\vfs\provider

Simply checkout vfs from http://svn.apache.org/repos/asf/commons/proper/vfs/trunk to get access to it.

There you will also find a "vfs-providers.xml" which you have to provide to give VFS a clue where to find your provider and which namespace to use to access it.

Basically you have to provide implementations of
* AbstractFileObject (including the FileObject interface)
* AbstractFileSystem (including the FileSystem interface)
* AbstractOriginatingFileProvider (including the FileProvider interface)

When looking at the sandbox it sould become clear what to do. Unhappily there is no wiki which describes these steps in every detail.

Ciao,
Mario