public static bool IsExecutable(string ext) { const string EXTS = ".COM|.EXE|.BAT|.CMD|.VBS|.VBE|.JS|.JSE|.WSF|.WSH|.MSC|.LNK"; return(ext != null && ext.Length > 2 && -1 != EXTS.IndexOf(ext.ToUpper())); }
protected override List <string> readFilePaths() { return(Directory.GetFiles(fileLocation, "*.*", SearchOption.AllDirectories) .Where(s => EXTS.Any(e => s.EndsWith(e))).ToList()); }