/// <summary> /// If local and external have different times, then copy local to external /// </summary> public override void ProcessFile(SyncFileInfo localFile, SyncFileInfo externalFile) { if (CompareTimes(localFile.LastWriteTime, externalFile.LastWriteTime) != 0) { mover.Replace(from: localFile, to: externalFile); } }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { if (Responder.SeekYes(String.Format("Replace {0}", to.FullName))) { Logger.WriteLine("Replace '{0}' -> '{1}'", from, to); } }
public override void Remove(SyncFileInfo file) { if (Responder.SeekYes(String.Format("Delete {0}", file.FullName))) { Logger.WriteLine("Remove '{0}'", file); } }
public override void Remove(SyncFileInfo file) { if (Responder.SeekYes(String.Format("Delete {0}", file.FullName))) { Actioner.DeleteFile(file.FullName); } }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { if ((to.Origin != OriginEnum.Local) || (to.Origin == OriginEnum.Local && Responder.SeekYes(String.Format("Replace {0}", to.FullName)))) { Logger.WriteLine("Replace '{0}' -> '{1}'", from, to); } }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { if (Responder.SeekYes(String.Format("Replace {0}", to.FullName))) { Actioner.DeleteFile(to.FullName); Actioner.Copy(from.FullName, to.FullName); } }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { if ((to.Origin != OriginEnum.Local) || (to.Origin == OriginEnum.Local && Responder.SeekYes(String.Format("Replace {0}", to.FullName)))) { Actioner.DeleteFile(to.FullName); Actioner.Copy(from.FullName, to.FullName); } }
/// <summary> /// Take decision in case only externalFile exists /// </summary> public abstract void ProcessFile(SyncFileDirName localFile, SyncFileInfo externalFile);
public override void Copy(SyncFileInfo from, SyncFileDirName toFullName) { Actioner.Copy(from.FullName, toFullName.FullName); }
public abstract void Remove(SyncFileInfo file);
public abstract void Copy(SyncFileInfo from, SyncFileDirName toFullName);
/// <summary> /// localFile doesn't exist, so deletes external file. /// </summary> public override void ProcessFile(SyncFileDirName localFile, SyncFileInfo externalFile) { mover.Remove(externalFile); }
public override void Copy(SyncFileInfo from, SyncFileDirName toFullName) { Logger.WriteLine("Copy '{0}' -> '{1}'", from, toFullName); }
public abstract void Replace(SyncFileInfo from, SyncFileInfo to);
/// <summary> /// External file doesn't exist so copy. /// </summary> public override void ProcessFile(SyncFileInfo localFile, SyncFileDirName externalFile) { mover.Copy(from: localFile, toFullName: externalFile); }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { Logger.WriteLine("Replace '{0}' -> '{1}'", from, to); }
public override void Replace(SyncFileInfo from, SyncFileInfo to) { Actioner.DeleteFile(to.FullName); Actioner.Copy(from.FullName, to.FullName); }