lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r805863 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
Date Wed, 19 Aug 2009 16:15:45 GMT
Author: digy
Date: Wed Aug 19 16:15:44 2009
New Revision: 805863

URL: http://svn.apache.org/viewvc?rev=805863&view=rev
Log:
adding a simple FileStream.Flush for Java's file.getFD().sync().

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=805863&r1=805862&r2=805863&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 16:15:44 2009
@@ -1613,20 +1613,25 @@
     }
 
 
-    //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
-    //    {
-    //    }
-    //}
+    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
+        //{
+        //}
+
+        public static void Sync(System.IO.FileStream fs)
+        {
+            fs.Flush();
+        }
+    }
 
 
 }



Mime
View raw message