public static void IndexDocs(IndexWriter writer, System.IO.FileInfo file)
{
if (System.IO.Directory.Exists(file.FullName))
{
System.String[] files = System.IO.Directory.GetFileSystemEntries(file.FullName);
for (int i = 0; i < files.Length; i++)
IndexDocs(writer, new System.IO.FileInfo(file.FullName + "\\" + files[i]));
}
else
{
System.Console.Out.WriteLine("adding " + file);
writer.AddDocument(FileDocument.Document(file));
}
}
}