[Mono-devel-list] Flushing a FileStream to disk
Dick Porter
dick at ximian.com
Fri Nov 5 11:59:34 EST 2004
On Fri, 2004-11-05 at 17:12 +0100, Jeroen Frijters wrote:
> Dick Porter wrote:
> > The Mono.Posix way that someone suggested. Especially now
> > that Jon has checked in the new version.
>
> Thanks, but that leaves me with two questions. What Posix API do I call
> and, more importantly, is the FileStream.Handle property guaranteed to
> contain a Posix file descriptor?
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.
- Dick
More information about the Mono-devel-list
mailing list