public void RestoreSnapshot(PackageHandler item, SnapshotHandler snapshot) { var blob = ((AzurePackageHandler)item).Blob; var snapshotBlob = ((AzureSnapshotHandler)snapshot).Blob; blob.StartCopy(snapshotBlob); }
public void RestoreSnapshot(PackageHandler item, SnapshotHandler snapshot) { var src = (FileSystemStorage.FileSystemHandler)item; var snapshotItem = (FileSystemSnapshotHandler)snapshot; File.Copy(snapshotItem.FilePath, src.FilePath, true); }
public async Task <SnapshotHandler> CreateSnapshot(PackageHandler item) { var blob = ((AzurePackageHandler)item).Blob; var sourceSnapshot = await blob.CreateSnapshotAsync(); return(new AzureSnapshotHandler(sourceSnapshot)); }
public Task UploadAsync(PackageHandler item, string path) { var h = (FileSystemHandler)item; File.Copy(path, h.FilePath, true); return(Task.FromResult(0)); }
public async Task <SnapshotHandler> CreateSnapshot(PackageHandler item) { var src = (FileSystemStorage.FileSystemHandler)item; var dest = Path.Combine(_tempDirectory, src.Name); return(await Task.Run(() => { File.Copy(src.FilePath, dest, true); return new FileSystemSnapshotHandler(dest); })); }
public async Task UploadAsync(PackageHandler item, string path) { var sourceBlob = ((AzurePackageHandler)item).Blob; await sourceBlob.UploadFromFileAsync(path); }
public async Task DownloadAsync(PackageHandler item, string path) { var sourceBlob = ((AzurePackageHandler)item).Blob; await sourceBlob.DownloadToFileAsync(path, FileMode.Create); }