From: Joe Shaw <joeshaw@novell.com>

FileExists() gets called a *lot*.  We can avoid a bunch of string
allocations inherent in creating a FileInfo object by just using
File.Exists() rather than FileInfo.Exists().  Unfortunately we can't
seem to avoid the allocation of the Path.Combine().

Index: Store/FSDirectory.cs
===================================================================
RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/FSDirectory.cs,v
retrieving revision 1.14
diff -u -p -u -r1.14 FSDirectory.cs
--- Store/FSDirectory.cs	31 Oct 2005 00:37:06 -0000	1.14
+++ Store/FSDirectory.cs	13 Mar 2006 21:39:44 -0000
@@ -403,13 +403,9 @@ namespace Lucene.Net.Store
 		/// <summary>Returns true iff a file with the given name exists. </summary>
 		public override bool FileExists(System.String name)
 		{
-			System.IO.FileInfo file = new System.IO.FileInfo(System.IO.Path.Combine(directory.FullName, name));
-			bool tmpBool;
-			if (System.IO.File.Exists(file.FullName))
-				tmpBool = true;
-			else
-				tmpBool = System.IO.Directory.Exists(file.FullName);
-			return tmpBool;
+			string path = System.IO.Path.Combine (directory.FullName, name);
+
+			return System.IO.File.Exists (path) || System.IO.Directory.Exists (path);
 		}
 		
 		/// <summary>Returns the time the named file was last modified. </summary>
