public bool PassesGlobalExcludes(string path) { // it must not match any global exclude foreach (GlobalExcludeFiltersRow row in GlobalExcludeFilters) { FileMask wildcard = new FileMask(row.Mask); if (wildcard.IsMatch(path)) { return(false); } } return(true); }
private string GetInfoForMask(string mask) { if (mask.Length == 0) { return(""); } FileMask fileMask = new FileMask(mask); if (fileMask.type == FileMask.Type.Mask) { string ext = mask.Substring(2); return(ShellIcon.GetTypeInfo("x." + ext)); } return(fileMask.GetTypeInfo()); }
public bool PassesGlobalIncludes(string path, MatchReason reason) { // it must match at least one global include foreach (GlobalIncludeFiltersRow row in GlobalIncludeFilters) { FileMask wildcard = new FileMask(row.Mask); if (wildcard.IsMatch(path)) { reason.Set(row.Mask, MatchReason.Status.Included); return(true); } } // didn't match any include return(false); }
public bool PassesLocalExcludes(string path, MatchReason reason) { ExcludeFiltersRow[] excludes = GetExcludeFiltersRows(); // it must not match any global exclude foreach (ExcludeFiltersRow exclude in excludes) { FileMask wildcard = new FileMask(exclude.Mask); if (wildcard.IsMatch(path)) { reason.Set(exclude.Mask, MatchReason.Status.Excluded); return(false); } } // passed excludes return(true); }
public bool PassesLocalIncludes(string path, MatchReason reason) { IncludeFiltersRow[] includes = GetIncludeFiltersRows(); // it must match at least one global include foreach (IncludeFiltersRow include in includes) { FileMask wildcard = new FileMask(include.Mask); if (wildcard.IsMatch(path)) { reason.Set(include.Mask, MatchReason.Status.Included); return(true); } } // didn't match any include return(false); }