Boris Zbarsky wrote:
>
> Yes. For example, when implementing the "accept" attribute of <input
> type="file">.
>
I hope you're just being theoretical. Do you really want mozilla to open every
file it doesn't understand just to see what's in it? And what do you do with a
mime type you don't know about?
> More to the point, there are many cases where you need to know the file type in
> one part of the code and actually use the file in a different part. Form
> submission is one such example. Now such code could probably be rearchitected
> somewhat, but the question is whether this is desirable.
>
> Boris
But knowing the stat of a file at time t_1 says nothing about the file's state
at time t_2. That's always a issue with unix and it's becoming and issue with
Windows. The only way to ensure a consistent state is to open the file and
hold it open as long as you think you think you need it. That's using it as
far as I'm concerned. And once you're using it, the question, then, is how.
Since mozilla already knows about streams (and named pipes really are
streams), it just seems much simpler to treat everything equivalently.
--
Jupiter
2003-08-12 09:04:30.983 UTC (JD 2452863.878136)
X = -4.555107143, Y = 2.564192490, Z = 1.209997904
X' = -0.004080009, Y' = -0.005597587, Z' = -0.002299995