/// <summary> /// Creates a new instance from a stream. /// </summary> /// <param name="fileStream">The stream containing the .XVA file</param> /// <param name="ownership">Whether to transfer ownership of <c>fileStream</c> to the new instance.</param> public VirtualMachine(Stream fileStream, Ownership ownership) { _fileStream = fileStream; _ownership = ownership; _fileStream.Position = 0; _archive = new TarFile(fileStream); }
/// <summary> /// Initializes a new instance of the VirtualMachine class. /// </summary> /// <param name="fileStream">The stream containing the .XVA file.</param> /// <param name="ownership">Whether to transfer ownership of <c>fileStream</c> to the new instance.</param> public VirtualMachine(Stream fileStream, Ownership ownership) { _fileStream = fileStream; _ownership = ownership; _fileStream.Position = 0; Archive = new TarFile(fileStream); }
public DiskStream(TarFile archive, long length, string dir) { _archive = archive; _length = length; _dir = dir; if (!archive.DirExists(_dir)) { throw new IOException("No such disk"); } ReadChunkSkipList(); }
public DiskStream(TarFile archive, long length, string dir) { _archive = archive; _length = length; _dir = dir; if (!archive.DirExists(_dir)) { throw new IOException("No such disk"); } int numChunks = (int)((length + Sizes.OneMiB - 1) / Sizes.OneMiB); }