lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject svn commit: r1350178 - /incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs
Date Thu, 14 Jun 2012 10:19:14 GMT
Author: synhershko
Date: Thu Jun 14 10:19:13 2012
New Revision: 1350178

URL: http://svn.apache.org/viewvc?rev=1350178&view=rev
Log:
Allow for opening FSDirectory with a string

A proposed change - I'm tired of creating a DirInfo object all the time, doesn't really add
any value

Modified:
    incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs

Modified: incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs?rev=1350178&r1=1350177&r2=1350178&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs Thu Jun 14 10:19:13 2012
@@ -210,6 +210,31 @@ namespace Lucene.Net.Store
                 }
             }
 		}
+
+		/// <summary>Creates an FSDirectory instance, trying to pick the
+		/// best implementation given the current environment.
+		/// The directory returned uses the <see cref="NativeFSLockFactory" />.
+		/// 
+		/// <p/>Currently this returns <see cref="SimpleFSDirectory" /> as
+		/// NIOFSDirectory is currently not supported.
+		/// 
+		/// <p/><b>NOTE</b>: this method may suddenly change which
+		/// implementation is returned from release to release, in
+		/// the event that higher performance defaults become
+		/// possible; if the precise implementation is important to
+		/// your application, please instantiate it directly,
+		/// instead. On 64 bit systems, it may also good to
+		/// return <see cref="MMapDirectory" />, but this is disabled
+		/// because of officially missing unmap support in Java.
+		/// For optimal performance you should consider using
+		/// this implementation on 64 bit JVMs.
+		/// 
+		/// <p/>See <a href="#subclasses">above</a> 
+		/// </summary>
+		public static FSDirectory Open(string path)
+		{
+			return Open(new DirectoryInfo(path), null);
+		}
 		
 		/// <summary>Creates an FSDirectory instance, trying to pick the
 		/// best implementation given the current environment.



Mime
View raw message