Beispiel #1
0
 /// <summary>
 /// Ritorna un array di stringhe contenente i nomi dei file nel path passato
 /// </summary>
 /// <param name="Path">Cartella da cui leggere i file</param>
 /// <param name="ExcludedExtension">Lista di estensioni da escludere dal GET!</param>
 /// <returns></returns>
 public static String[] GetFiles(String Path,params String[] ExcludedExtension)
 {
     String[] t=Directory.GetFiles(Path);
     ListPlus<String> lp = new ListPlus<string>();
     foreach(String s in t)
     {
         bool DaEscludere = false;
         foreach(string ext in ExcludedExtension)
         {
             if(s.EndsWith(ext.OneCharStart('.')))
             {
                 DaEscludere = true;
                 break;
             }
         }
         if (!DaEscludere)
             lp.Add(s);                
     }
     return lp.ToArray();
 }
Beispiel #2
0
 public  Option()
 {
     _Extensions = new ListPlus<String>();
     _Extensions.OnAdd += (object sender, EventArgs e) => { cv |= ChangedVar.Extensions; };
     _Extensions.OnRemove += (object sender, EventArgs e) => { cv |= ChangedVar.Extensions; };
 }