If I wanted to add this functionality to the mono class library so no p/invokes are required, does anyone have any suggestions where it should be added? I've seen most new functionality added to Mono.* classes, but I don't see anything like Mono.IO. Are there any guidelines on where something like this might go?
Patrick On 1/9/07, Robert Jordan <[EMAIL PROTECTED]> wrote: > On MS.NET and Mono for Windows, the proper function is WIN32's > FlushFileBuffers()that can be called via p/invoke from kernel32.dll > either on FileStream.Handle, or (.NET 2.0) on FileStream.SafeFileHandle. > > On Linux, FlushFileBuffers() is provided by Mono's WAPI layer > that calls fsync(2) internally, but I don't know how it can be > called from managed code. Maybe like this (untested): > > [DllImport("__Internal")] > public static bool FlushFileBuffers (IntPtr handle); > > For .NET 2.0: > [DllImport("__Internal")] > public static bool FlushFileBuffers (SafeFileHandle handle); _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list