[Mono-devel-list] Flushing a FileStream to disk
monoman at gmail.com
Wed Nov 10 14:50:09 EST 2004
Well in MS .NET it doesn't it just guarantees that the class buffers
are sent to the IO APIs, it does not call any API that would make the
filesystem buffers be flushed. As so we duplicated that behavior in
our implementation last time I checked.
On Wed, 10 Nov 2004 13:40:04 -0500, Miguel de Icaza <miguel at ximian.com> wrote:
> > > Sounds like fsync or fdatasync (both in Mono.Posix.Syscall)
> > > are what you need, depending on whether you want to update the
> > > metadata too.
> > > FileStream.Handle corresponds to the file descriptor since
> > > version 1.0.1 or so. Works for sockets too.
> > Thanks. I'll use FlushFileBuffers on Windows and on non-Windows systems
> > I'll use Mono.Posix.Syscall.fsync and I'll fall back to
> > System.IO.MonoIO.Flush on Mono 1.0.
> > Miguel: It might be a good suggestion for ECMA to add Sync() to
> > FileStream.
> On a FileStream, is there a reason why FileStream.Flush does not
> accomplish this?
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Rafael "Monoman" Teixeira
Just the 'crazy' me in a sane world, or would it be the reverse? I dunno...
More information about the Mono-devel-list