20 namespace Lucene.Net.Demo.Html
26 public static void Main(System.String[] argv)
28 if (
"-dir".Equals(argv[0]))
30 System.String[] files = System.IO.Directory.GetFileSystemEntries(
new System.IO.FileInfo(argv[1]).FullName);
31 System.Array.Sort(files);
32 for (
int i = 0; i < files.Length; i++)
34 System.Console.Error.WriteLine(files[i]);
35 System.IO.FileInfo file =
new System.IO.FileInfo(System.IO.Path.Combine(argv[1], files[i]));
40 Parse(
new System.IO.FileInfo(argv[0]));
43 public static void Parse(System.IO.FileInfo file)
45 System.IO.FileStream fis = null;
48 fis =
new System.IO.FileStream(file.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
52 System.Console.Out.WriteLine(
"Content:");
53 System.IO.StreamReader reader =
new System.IO.StreamReader(parser.
GetReader().BaseStream, parser.
GetReader().CurrentEncoding);
54 for (System.String l = reader.ReadLine(); l != null; l = reader.ReadLine())
55 System.Console.Out.WriteLine(l);