public void Apply() { string newRelativePath; string newShortRelativePath; if (!_oldFullPath.StartsWithIgnoreCase(_rootDirectory)) { if (IsFileAllowed(_rootDirectory, _fullPath, _fileSystem, _fileSystemFilter, out newRelativePath, out newShortRelativePath)) { _entries.AddFile(newRelativePath, newShortRelativePath); } return; } var oldRelativePath = PathHelper.MakeRelative(_rootDirectory, _oldFullPath); if (IsFileAllowed(_rootDirectory, _fullPath, _fileSystem, _fileSystemFilter, out newRelativePath, out newShortRelativePath)) { _entries.RenameFile(oldRelativePath, newRelativePath, newShortRelativePath); } else { _entries.DeleteFile(oldRelativePath); } }
public void Apply() { if (!_fullPath.StartsWithIgnoreCase(_rootDirectory)) { return; } var relativePath = PathHelper.MakeRelative(_rootDirectory, _fullPath); _entries.DeleteFile(relativePath); }