Пример #1
0
        public void Save(sio.FileStream fs, FileDirectoryDescriptor parent)
        {
            int i;

            misc.WriteStruct(fs, files[0].hdr);
            fs.WriteByte(0);

            misc.WriteStruct(fs, parent.hdr);
            fs.WriteByte(1);

            for (i = 1; i < files.Count; i++)
            {
                fs.CondAlign(ISO9660.logSize, files[i].RecSize);
                files[i].Save(fs);
            }
            fs.Align(ISO9660.logSize);
        }
Пример #2
0
        public void Save(sio.FileStream fs)
        {
            int i;

            foreach (var rec in recs)
            {
                fs.CondAlign(ISO9660.logSize, rec.RecSize);
                rec.Save(fs);
            }
            fs.Align(ISO9660.logSize);

            foreach (var rec in recs)
            {
                fs.CondAlign(ISO9660.logSize, rec.RecSize);
                rec.SaveM(fs);
            }
            fs.Align(ISO9660.logSize);

            for (i = 0; i < recs.Count; i++)
            {
                if (i == 0)
                    recs[i].files.Save(fs, recs[0].files[0]);
                else
                    recs[i].files.Save(fs, recs[i - 1].files[0]);
            }
        }
Пример #3
0
        public FileRecords(sio.FileStream fs, string dirName, string dirFullName)
        {
            FileDirectoryDescriptor fd;
            long recEnd;

            files = new List<FileDirectoryDescriptor>();

            recEnd = fs.Position;
            fd = new FileDirectoryDescriptor(fs); //curr dir
            fd.name = dirName;
            fd.fullName = dirFullName;
            files.Add(fd);
            recEnd += fd.hdr.datLenL;

            fs.Position += fs.ReadByte(); //skip parent dir
            while (fs.Position < recEnd)
            {
                fd = new FileDirectoryDescriptor(fs);
                if (fd.hdr.lenDirRec > FileDirectoryDescriptor.DefaultSize)
                {
                    fd.fullName = dirFullName + fd.name;
                    if (fd.isDirectory)
                        if (fd.fullName.Length > 0)
                            fd.fullName += config.dirSep;
                    files.Add(fd);
                }
                fs.CondAlign(ISO9660.logSize, FileDirectoryDescriptor.DefaultSize);
            }
        }