public void Restore(VolumeSnapshot snapshot, BaseArchive archive, string onDiskPath)
        {
            mOperation.Reset();

            mFileTotalCount        = 0;
            mFilesTotalSize        = 0;
            mFileRunningCount      = 0;
            mFilesTotalSizeRunning = 0;

            try
            {
                mBusy = true;

                VolumeSnapshotDirectory vsd = snapshot.Root;
                mFileTotalCount = vsd.CountAllFiles(ref mFilesTotalSize);

                if (!mOperation.CanContinue)
                {
                    return;
                }

                int relativePathStartIndex = vsd.RelativePath.LastIndexOf(PWLib.Platform.Windows.Path.DirectorySeparatorChar);
                if (relativePathStartIndex < 0)
                {
                    relativePathStartIndex = 0;
                }
                ProcessDirectoryRestore(vsd, archive, relativePathStartIndex, onDiskPath);
            }
            finally
            {
                mBusy = false;
            }
        }
 public bool DoFullBackup(VolumeSnapshot currentSnapshot, VolumeSource source, BaseArchive archive)
 {
     mOperation.Reset();
     mFileTotalCount        = currentSnapshot.FileCount;
     mFileRunningCount      = 0;
     mFilesTotalSize        = currentSnapshot.TotalFileSize;
     mFilesTotalSizeRunning = 0;
     mArchive = archive;
     mSource  = source;
     return(CopyAll(currentSnapshot.Root));
 }
 public bool CompareSnapshots(VolumeSnapshot oldDb, VolumeSnapshot newDb, bool countFilesOnly)
 {
     mStats.Reset(!countFilesOnly);
     mOperation.Reset();
     return(ProcessDirectory(oldDb.Root, newDb.Root));
 }