|
|
Nicolas Alvarez wrote:
>> Unlike UNIX, it's not just a matter of seeking around. You have to
>> open the file as a sparse file, then you have to say "hey, this area
>> is sparse" rather than (say) just writing all zeros to the blocks or
>> something.
>
> Not really... Cross-platform programs that don't use any
> Windows-specific API manage to create sparse files here.
I think if you write to it, regardless of what you write, you get
allocated space. UNIX *used* to see an all-zeros buffer and say "Gee, we
don't need to write that." You didn't have to seek over the sparse
space to make it sparse, IIRC.
I think the calls I'm thinking of are for making an existing data area
sparse, too; i.e., throwing away the beginning of a log file without
changing offsets of existing records. And you may even need to open the
file in "sparse" mode.
Or, I could be completely wrong. This one I never actually did. :-)
--
Darren New / San Diego, CA, USA (PST)
Remember the good old days, when we
used to complain about cryptography
being export-restricted?
Post a reply to this message
|
|