static void DeleteParentFilesIfExists(IPath path, IAbsoluteDirectoryPath backupPath) { while (path.HasParentDirectory) { path = path.ParentDirectoryPath; var s = path.ToString(); if (File.Exists(s)) { File.Delete(s); break; } if (path.Equals(backupPath)) { break; } } }
private bool Equals(CutSubcurve other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (Equals(other.Source, Source) && other._touchAtFromPoint.Equals(_touchAtFromPoint) && other._touchAtToPoint.Equals(_touchAtToPoint) && (_path.Equals(other._path) || // path can be reference equal ((IClone)_path).IsEqual((IClone)other._path))); // or IClone.IsEqual }
public bool EqualsTo(IPath path) { return(_path.Equals(path)); }
static void DeleteParentFilesIfExists(IPath path, IAbsoluteDirectoryPath backupPath) { while (path.HasParentDirectory) { path = path.ParentDirectoryPath; var s = path.ToString(); if (File.Exists(s)) { File.Delete(s); break; } if (path.Equals(backupPath)) break; } }