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




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 config.zip/tar 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 [mailto:[EMAIL PROTECTED]
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"
<[EMAIL PROTECTED]> said:

I agree with the points made /but/, the reason I would like a File
subclass
is to allow me to get the "use a zip file as a directory" feature for
free,
as in, not-change-any-of-my-giant-pile-of-code free.

Gary

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to