[Gdal-dev] Creating files, File I/O, and VRT

Frank Warmerdam warmerdam at pobox.com
Thu Dec 14 21:33:48 EST 2006


On 12/14/06, Matt Hanson <mhanson at photon.com> wrote:
> I'm wondering about what the expected behavior is when Creating files and when the files are actually written from memory to disk.   I've encountered some strangeness in a file not existing when I think it should.
>
> First, when writing other file formats the file on disk gets created right away, even before I've written any data to it.
>
> With VRT files they don't seem to get written to disk right away.   Do I have to
> delete dataset;
>
> in order for it to actually get written ?   It seems like it but I wanted to know what the behavior is supposed to be for regular files as well as VRT files.


Matt,

It is guaranteed that files will be fully written to disk
by the time the dataset has been fully closed/deleted.

Other than that behavior is driver dependent.

There is a SyncToDisk() method on the dataset that is
intended to cause the file to be flushed to disk and left
in a valid to access state.  For a VRT I think this will
cause it to be flushed to disk.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list