commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: [vfs] res: protocol issue (possible enhancement?)
Date Thu, 04 Aug 2005 04:58:11 GMT
Hi Mario,

I'm a little lost on how to implement this.  I can't just have something 
like a ClasspathFileProvider extending ResourceFileProvider and overriding 
findFile(), because that only allows for a single base path.  For instance, 
if I had...

FileSystemManager fsManager = VFS.getManager();
FileObject pkg = fsManager.resolveFile( "res:com/mycompany/mypackage" );

And my classpath looked like the following (with both "com" in the current 
directory and that same package in my.jar)...

.;my.jar

I'd need the FileObject to represent multiple paths so when I can 
pkg.getChildren(), it represents resources from both package paths, not 
just the first one it finds, which is the current case with the "res" 
scheme.  Is there an existing example FileObject impl that represents 
multiple paths?  If not, how would I go about this?  I just need a little 
direction.


thanks,

Jake

At 09:33 AM 8/3/2005 -0500, you wrote:
 >Quoting Mario Ivankovits <mario@ops.co.at>:
 >
 >> Jacob Kjome wrote:
 >> > It looks like the only special characters allowed in the scheme are
 >> > '+', '-', and '.'.  I guess that means my proposed "res*:" protocol is
 >> > out.  Is there a reason that only the said special characters are
 >> > allowed and not others?  Would '*' be ok to add to that list?  Or is
 >> > there a URL standard that you are following here that limits the
 >> > characters to what has already been specified?  If '*' isn't allowed,
 >> > would it be ok to use "res+:"?
 >> What if we simply name it "classpath:"?
 >>
 >> So "res:" uses the default JVM rules and "classpath:" scans the whole
 >> classpath.
 >>
 >
 >That probably makes sense.  I'll try to look into this tonight.
 >
 >Jake
 >
 >>
 >> ---
 >> Mario
 >>
 >>
 >> ---------------------------------------------------------------------
 >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
 >> For additional commands, e-mail: commons-user-help@jakarta.apache.org
 >>
 >
 >
 >
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
 >For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
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