Ejemplo n.º 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);
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
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();
        }