/// <summary> /// Initializes a new restore instance /// </summary> /// <param name="archive"> /// The file system archive for the restore /// </param> /// <param name="session"> /// The restore session being processed /// </param> public FileSystemRestore(FileSystemArchive archive, Restore.Session session) { this.blobFile = IO.FileSystem.Open(archive.BlobPath); }
/// <summary> /// Initializes a new backup instance /// </summary> /// <param name="archive"> /// The file system archive for the backup /// </param> /// <param name="session"> /// The backup session being processed /// </param> public FileSystemBackup(FileSystemArchive archive, Backup.Session session) { this.archive = archive; this.blobFile = IO.FileSystem.Append(archive.BlobPath); this.copier = new IO.StreamCopier(); }
/// <summary> /// Creates and connects to a new backup archive /// </summary> /// <param name="name"> /// The name of the new archive /// </param> /// <param name="header"> /// The archive backup index header /// </param> /// <returns> /// The connected archive implementation /// </returns> public IArchive CreateArchive(String name, Backup.Header header) { var archive = new FileSystemArchive((IO.Path)this.Path + name); archive.Create(header); return archive; }
/// <summary> /// Releases the resources associated with the backup /// </summary> public void Dispose() { if (this.blobFile != null) this.blobFile.Dispose(); this.archive = null; this.blobFile = null; }
/// <summary> /// Opens an existing backup archive /// </summary> /// <param name="name"> /// The name of the archive to open /// </param> /// <returns> /// The connected archive implementation /// </returns> public IArchive OpenArchive(String name) { var archive = new FileSystemArchive((IO.Path)this.Path + name); archive.Open(); return archive; }