public static IsInvalidFolderName ( string name ) : bool | ||
name | string | |
return | bool |
public static bool IsInvalidFolderName(string name)
{
bool ret = invalidFolderNameRegex.IsMatch(name);
if (ret)
{
Logger.Debug(String.Format("The given directory name {0} contains invalid patterns", name));
return ret;
}
return ret;
}
/// <summary> /// If the given path should be ignored, TRUE will be returned, /// otherwise FALSE. /// </summary> /// <param name="path"></param> /// <returns></returns> public bool isPathIgnored(string path) { if (Utils.IsInvalidFolderName(path.Replace("/", "").Replace("\"", ""))) { return(true); } return(!String.IsNullOrEmpty(ignoredPaths.Find(delegate(string ignore) { if (String.IsNullOrEmpty(ignore)) { return false; } return path.StartsWith(ignore); }))); }