commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: [VFS] access the same file in different file systems with a relative path
Date Fri, 30 Sep 2005 05:37:07 GMT
Felipe Crochik wrote:
>resolveFile("SCHEMA1:somefolder/somefile.someextension") and have the
>SCHEMA1 defined in the providers.xml
Sure, you can create your own FileProvider which then routes to the real 
FileProvider. See: ResourceFileProvider.java


But isnt it a little bit of overkill?

You could also simply resolve the root-folder:

FileObject foRoot = VFS.getManager().resolveFile("http://path/to/root/");

and then use this root to resolve all relative paths:

FileObject fo = foRoot.resolveFile("path/from/database/file.txt");


---
Mario


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


Mime
View raw message