commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <>
Subject Re: [vsf] WAS: [general] Zip file proxy?
Date Fri, 14 Nov 2003 16:49:36 GMT
I've been in similar situations, where I had a lot of references to File 
objects, but then started loading resources as URLs from the classpath.

Eventually, if you're reading config data you need an InputStream.  You 
may want to consider passing streams or Properties objects around 
instead of File references -- especially since your config data is 
read-only.  For security purposes, why even allow access to methods like 
delete() or deleteOnExit()?  All the components care about is the 
content of the File.

This obviously doesn't solve your problem... but it may be something to 

Gary Gregory wrote:
> You're probably right, I was thinking in a would-it-not-be-nice mode. 
> To be more realistic, I should mention the usage scenario I have in mind:
> Our server is configured with a "config" directory which contain a bunch of
> files and sub-directories. It would be nice if I could read our server's
> config from a file instead of a dir. This makes it easier to
> email configs around. If I can pass a VSF File subclass into our config
> code, I should not need to fiddle our code, especially since our config is
> read-only.
> Gary
>>-----Original Message-----
>>From: Todd V. Jonker []
>>Sent: Friday, November 14, 2003 07:27
>>To: Jakarta Commons Developers List
>>Subject: RE: [vsf] WAS: [general] Zip file proxy?
>>Hi Gary,
>>Aren't you concerned that your giant-pile-of-code will behave incorrectly
>>due to the fact that a File embedded in a Zip can't implement most of the
>>File API properly?  For anything but the most trivial pile I'd be pretty
>>worried about unintended, or even damaging, behavior.
>>On Thu, 13 Nov 2003 17:08:49 -0500, "Gary Gregory"
>><> said:
>>>I agree with the points made /but/, the reason I would like a File
>>>is to allow me to get the "use a zip file as a directory" feature for
>>>as in, not-change-any-of-my-giant-pile-of-code free.
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message