Example #1
0
        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.MoveFileAsync(source, dest, true, monitor);
            }
            else
            {
                CopyFile(source, dest, true);
                srcRepo.DeleteFileAsync(source, true, monitor, false);
            }
        }