コード例 #1
0
ファイル: iso.cs プロジェクト: bsv798/p3fes
 public VolumePartition(PrimaryVolumeDescriptor pvd, PathTableRecords paths)
 {
     this.primary = pvd;
     this.paths = paths;
     terminator = new VolumeDescriptorSetTerminator();
 }
コード例 #2
0
ファイル: iso.cs プロジェクト: bsv798/p3fes
        public VolumePartition(sio.FileStream fs)
        {
            bool termFound;

            termFound = false;
            while (!termFound)
            {
                switch (fs.ReadByte())
                {
                    case 0:
                        throw new NotImplementedException("Boot records are not supported");
                    case 1:
                        primary = new PrimaryVolumeDescriptor(fs);
                        break;
                    case 2:
                        throw new NotImplementedException("Supplementary descriptors are not supported");
                    case 3:
                        partition = new VolumePartitionDescriptor(fs);
                        break;
                    case 255:
                        terminator = new VolumeDescriptorSetTerminator(fs);
                        termFound = true;
                        break;
                    default:
                        throw new NotImplementedException(string.Format("{0:x}: descriptor is not supported", fs.Position - 1));
                }
            }

            fs.Position = (long)primary.hdr3.locLTbl * ISO9660.logSize + ISO9660.fsOff;
            paths = new PathTableRecords(fs, primary.hdr3.pthTblSizeL);
            for (int i = 0; i < paths.Count; i++)
            {
                fs.Position = (long)paths[i].hdr.locExtent * ISO9660.logSize + ISO9660.fsOff;
                paths[i].files = new FileRecords(fs, paths[i].name, paths[i].fullName);
            }
        }