public bool NeedToCopy(FolderMap baseMap, string aSource, string aTarget) { if (!_fileSystem.File.Exists(aTarget)) { Logger.Debug($"NeedToCopyWithConfirmation: File {aTarget} not found! Need to copy."); return(true); } return(_confirmationChecker.GetConfirmation(aTarget)); }
public bool NeedToCopy(FolderMap baseMap, string aSource, string aTarget) { Logger.Debug($"aSource={aSource}, aTarget={aTarget}"); Logger.Debug($"TypeOf(_fileSystem)={_fileSystem.GetType()} "); if (!_fileSystem.File.Exists(aTarget)) { Logger.Debug($"File {aTarget} not found! Need to copy."); return true; } else if (_fileComparer.IsSameFile(new FileInfo(aSource), new FileInfo(aTarget))) { Logger.Debug($"File {aTarget} equal to {aSource}! Skip file!"); return false; } return _confirmationChecker.GetConfirmation(aTarget); }