Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
        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();
        }