Exemple #1
0
 /// <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);
     }
 }
Exemple #2
0
 public override void Replace(SyncFileInfo from, SyncFileInfo to)
 {
     if (Responder.SeekYes(String.Format("Replace {0}", to.FullName)))
     {
         Logger.WriteLine("Replace '{0}' -> '{1}'", from, to);
     }
 }
Exemple #3
0
 public override void Remove(SyncFileInfo file)
 {
     if (Responder.SeekYes(String.Format("Delete {0}", file.FullName)))
     {
         Logger.WriteLine("Remove '{0}'", file);
     }
 }
Exemple #4
0
 public override void Remove(SyncFileInfo file)
 {
     if (Responder.SeekYes(String.Format("Delete {0}", file.FullName)))
     {
         Actioner.DeleteFile(file.FullName);
     }
 }
Exemple #5
0
 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);
     }
 }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
 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);
     }
 }
Exemple #8
0
 /// <summary>
 /// Take decision in case only externalFile exists
 /// </summary>
 public abstract void ProcessFile(SyncFileDirName localFile, SyncFileInfo externalFile);
Exemple #9
0
 public override void Copy(SyncFileInfo from, SyncFileDirName toFullName)
 {
     Actioner.Copy(from.FullName, toFullName.FullName);
 }
Exemple #10
0
 public abstract void Remove(SyncFileInfo file);
Exemple #11
0
 public abstract void Copy(SyncFileInfo from, SyncFileDirName toFullName);
Exemple #12
0
 /// <summary>
 /// localFile doesn't exist, so deletes external file.
 /// </summary>
 public override void ProcessFile(SyncFileDirName localFile, SyncFileInfo externalFile)
 {
     mover.Remove(externalFile);
 }
Exemple #13
0
 public override void Copy(SyncFileInfo from, SyncFileDirName toFullName)
 {
     Logger.WriteLine("Copy '{0}' -> '{1}'", from, toFullName);
 }
Exemple #14
0
 public abstract void Replace(SyncFileInfo from, SyncFileInfo to);
Exemple #15
0
 /// <summary>
 /// External file doesn't exist so copy.
 /// </summary>
 public override void ProcessFile(SyncFileInfo localFile, SyncFileDirName externalFile)
 {
     mover.Copy(from: localFile, toFullName: externalFile);
 }
Exemple #16
0
 public override void Replace(SyncFileInfo from, SyncFileInfo to)
 {
     Logger.WriteLine("Replace '{0}' -> '{1}'", from, to);
 }
Exemple #17
0
 public override void Replace(SyncFileInfo from, SyncFileInfo to)
 {
     Actioner.DeleteFile(to.FullName);
     Actioner.Copy(from.FullName, to.FullName);
 }