/[EmuXPortal]/trunk/EmuXPortal/Api/RomParser.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Api/RomParser.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/EmuXPortal/Api/RomParser.cs	2012/04/04 07:21:54	37
+++ trunk/EmuXPortal/Api/RomParser.cs	2012/04/04 07:22:40	38
@@ -1,9 +1,11 @@
-´╗┐using System;
+´╗┐//#define LIST_ADDED_ROMS // when defined will log all found rom files
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using EmuXPortal.Logging;
 using System.IO;
+using System.Diagnostics;
 
 namespace EmuXPortal.Api
 {
@@ -18,11 +20,19 @@
         public List<IRomConfig> Roms { get; private set; }
         private List<string> GetRoms(string path, string searchPattern)
         {
-            logger.WriteLine("Searching for Roms in Folder: {0}", path);            
-            List<string> roms = (searchPattern == "*.*") 
-                ? new List<string>(Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)) 
+            logger.WriteLine("Searching for Roms in Folder: {0}", path);
+            List<string> roms = (searchPattern == "*.*")
+                ? new List<string>(Directory.GetFiles(path, "*.*", SearchOption.AllDirectories))
                 : new List<string>(Directory.GetFiles(path, "*.*", SearchOption.AllDirectories).Where(s => searchPattern.Contains(Path.GetExtension(s).ToLower())));
-            foreach (string rom in roms) { FileInfo fi = new FileInfo(rom); logger.WriteLine("\tAdding: {0}", fi.Name); }
+            #region LIST_ADDED_ROMS
+#if LIST_ADDED_ROMS
+            foreach (string rom in roms)
+            {
+                FileInfo fi = new FileInfo(rom);
+                logger.WriteLine("\tAdding: {0}", fi.Name);
+            }
+#endif
+            #endregion
             return roms;
         }
         private List<IRomConfig> GenerateRomConfig(List<string> roms, IEmuConfig config)

 

  ViewVC Help
Powered by ViewVC 1.1.22