[Mono-dev] Sparse files

Alan McGovern alan.mcgovern at gmail.com
Sun Mar 25 13:01:11 EDT 2007


Not quite, a sparse file is different to a normal file in how allocations
happen. For example if i wanted to write 1 megabyte at an index of 100
megabytes, a seek + write would result in a 101 megabyte file on the disk.

With a sparse file, there'd actually be 1 megabyte physically taken up on
disk but any program that tries to read that file would see that 1 megabyte
existing at an offset of 100 megabytes. (At least that's my understanding of


On 3/25/07, Miguel de Icaza <miguel at novell.com> wrote:
> Hello,
> > I'm just wondering if there's a cross platform way of creating sparse
> > files in c#. I was taking a look at the Mono.Unix namespace, but there
> > doesn't seem to be anything there that'd do it.
> Not that am aware of.  I imagine that you are using the standard Unix
> operations to create a sparse file (seek + write).
> Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070325/067a6d3d/attachment.html 

More information about the Mono-devel-list mailing list