public MoveFile ( FilePath localSrcPath, FilePath localDestPath, bool force, MonoDevelop.Core.ProgressMonitor monitor ) : void | ||
localSrcPath | FilePath | |
localDestPath | FilePath | |
force | bool | |
monitor | MonoDevelop.Core.ProgressMonitor | |
return | void |
public void MoveFile (FilePath localSrcPath, FilePath localDestPath, bool force, ProgressMonitor monitor)
{
ClearCachedVersionInfo (localSrcPath, localDestPath);
try {
OnMoveFile (localSrcPath, localDestPath, force, monitor);
} catch (Exception e) {
LoggingService.LogError ("Failed to move file", e);
File.Move (localSrcPath, localDestPath);
}
}
public override void MoveFile(FilePath source, FilePath dest) { ProgressMonitor monitor = new ProgressMonitor(); Repository srcRepo = GetRepository(source); Repository dstRepo = GetRepository(dest); if (dstRepo != null && dstRepo.CanMoveFilesFrom(srcRepo, source, dest)) { srcRepo.MoveFile(source, dest, true, monitor); } else { CopyFile(source, dest, true); srcRepo.DeleteFile(source, true, monitor, false); } }