[Mono-devel-list] Flushing a FileStream to disk
Miguel de Icaza
miguel at ximian.com
Wed Nov 10 13:40:04 EST 2004
Hello,
> > 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?
Miguel
More information about the Mono-devel-list
mailing list