//Note: be careful of the difference between Windows and Mac static bool IsContainDirectory(string path, string dir) { string[] dirs = dir.Split(new char[] { '/' }); dir = dirs[0]; string[] paths = path.Split(Path.DirectorySeparatorChar); bool result = ListUtility.IsContainElement(paths, dir); return(result); }
public static List <FileInfo> GetUsefulFileInfosFromDir(string path) { List <FileInfo> fileInfos = GetFileInfosFromDir(path); List <FileInfo> result = ListUtility.FilterList(fileInfos, (FileInfo info) => { return(!ListUtility.IsContainElement(_filterFiles, info.Name)); }); return(result); }