You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2009/08/19 02:33:02 UTC

svn commit: r805640 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Author: digy
Date: Wed Aug 19 00:33:02 2009
New Revision: 805640

URL: http://svn.apache.org/viewvc?rev=805640&view=rev
Log:
FlushFileBuffers (used in FSDirectory.Sync) added to SupportClass (Commented)

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=805640&r1=805639&r2=805640&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Wed Aug 19 00:33:02 2009
@@ -1613,4 +1613,20 @@
     }
 
 
+    //public class FileStream
+    //{
+    //    [System.Runtime.InteropServices.DllImport("kernel32")]
+    //    public static extern int FlushFileBuffers(Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle);
+
+    //    public static void Sync(System.IO.FileStream fs)
+    //    {
+    //        if (FlushFileBuffers(fs.SafeFileHandle) == 0) { throw new SyncFailedException(); }
+    //    }
+
+    //    public class SyncFailedException : Exception
+    //    {
+    //    }
+    //}
+
+
 }