//iso类的头文件
unit mystruct;
interface
const
sectorsize = 2048; //定义扇区的大小
bothword0 = $00000000; //bigword表示分bothendian,littleword在前,bigword在后
bothword1 = $01000001;
bothword2048 = $00080800;
markbuf: array[0..7] of byte = ($01, $43, $44, $30, $30, $31, $01, $00);
sysmarkbuf: array[0..4] of byte = ($57, $69, $6E, $33, $32);
volsetbuf: array[0..33] of Byte = ($22, $00, $14, $00, $00, $00, $00, $00, $00, $14, $00, $08, $00, $00, $00, $00
, $08, $00, $46, $01, $01, $08, $00, $00, $00, $02, $00, $00, $01, $00, $00, $01, $01, $00); //只有一个目录的情况下可行
applicationinfo = 'Application made in our think - gohoo';
// CD001_mark=$00013130304443FF;//= CD001
CD001_mark: array[0..7] of Byte = ($FF, $43, $44, $30, $30, $31, $01, $00);
type
//--- Graphic Tjpegimage
pisotop = ^Tisotop;
Tisotop = packed record
marked: array[0..7] of byte; //5byte= $0143443030310100(CDOO1)
systemidentifier: array[0..31] of char; //32byteWin32余下用20$57696E3332$20202020..
volumeidentifier: array[0..31] of char; // 32byte卷标余下用20填充
marks2: int64; //8=0;
totalsectors: array[0..1] of longword; //8byte as a both endian double word扇区总数量
marks1: array[0..15] of word; //32byte= zero
volumeSetSize: longword; //4byte=1 but as a both endian word(01 00 00 01)
volumeSequenceNumber: longword; //4byte=1 as volumeSetsize;
sectorSize: longword; //4byte=2048 asboth endian word(00 08 08 00)
pathTableLength: array[0..1] of integer; //8byte=pathtable number both endian double word
numberFirstSectorinFirst: Integer; //4byte= as a little endian double word
numberFirstSectorinSecond: Integer; //4byte= as a little endian double word
numberFirstSectorinFirstbig: integer; //4byte= as a big endian double word
numberFirstSectorinSecondbig: Integer; //4byte= as a big endian double word
rootDirectoryRecord: array[0..33] of byte; //34byte= roob path
volumeSetIdentifier: array[0..127] of byte; //128=0or20and'you want write' volume set identifier
publisherIdentifier: array[0..127] of byte; //128=0or20or'you want write'publisher identifier
dataPreparerIdentifier: array[0..127] of byte; //128=0or'you want write'data preparer identifier
applicationIdentifier: array[0..127] of char; //128
copyrightFileIdentifier: array[0..36] of byte; //37=0or you want write版权
abstractFileIdentifier: array[0..36] of byte; //37=0 or you want write 摘要
bibliographicalFileIdentifier: array[0..36] of byte; //37=0 or you want write 目录
datetimeVolumeCreation: array[0..16] of char; //17=datetime+$20 共17byte
datetimeRecentmodification: array[0..16] of char; //17=datetime+$20 共17byte
datetimeVolumeExpires: array[0..16] of char; //17=datetime+$20 共17byte;
datetimeVolumeEffective: array[0..16] of char; //17=datetime+$20 共17byte
mark0: byte; //1=1;
mark1: byte; //1=0;
reservedApplication: array[0..511] of byte; //512=0 or you want write;
endmark: array[0..652] of byte; //653=0;
end;
Ppathtop = ^Tpathtop;
Tpathtop = packed record
namelength: byte; //1=pathlength if root then =1
extractattr: byte; //1=0;
numbefirstsector: longword; //4=first sector in path ,double word;
numberparent: word; //2=number of record for parent directory the first record is number 1,
//the second record is number 2, etc.
end;
Pdirectorytop = ^Tdirectorytop;
Tdirectorytop = packed record
numberbytes: byte; //1=number of bytes in the record
extractattr: byte; //1=0;
firstsector: array[0..1] of integer; //8=number of the first sector of file data or directory,both endian double word,when empty file =0;
bytefile: array[0..1] of integer; //8=number of bytes of file data or length of directory
iyear: byte; //1=number of years since 1900
imonth: byte; //1=month, where 1=January, 2=February, etc.
iday: byte; //1=day of month, in the range from 1 to 31
ihour: byte; //1=hour, in the range from 0 to 23
iminute: byte; //1=in the range from 0 to 59
isecond: byte; //1=in the range from 0 to 59
ioffset: byte; //1=from Greenwich Mean Time
flags: byte; //1=0 or 2 for normal file
interleaved: byte; //1=0;
interleavegap: byte; //1=0;
volumesequence: array[0..1] of word; //4=1 both endia word;
dlength: byte; //1=dir length or filename length;
end;
pfilerecord=^filerecord;
filerecord = packed record
fname: string[255]; //文件名
fstart: Integer; //起始扇区
fsize: Integer; //文件大小
fscor: Integer; //占用扇区数
end;
pdirecord=^direrecord;
direrecord = packed record
dirindex: Integer; //路径编号
dirsize: Integer; //路径表尺寸
dirscord: Integer; //占用扇区数
dirstart: integer; //起始扇区
pdir: Integer; //父路径序号
pdirstart: Integer; //夫路径起始扇区
dirname: string[255]; //路径名成
end;
pallrecord=^allrecord;
allrecord = packed record
fname: string[255]; //文件名
fstart: Integer; //起始扇区
fsize: Integer; //文件大小
//分解
isfile:Boolean;//判断是路径还是文件
//分解
dirsize: Integer; //路径表尺寸
dirstart: integer; //起始扇区
dirname: string[255]; //路径名成
end;
Ppathrecord=^pathrecord;
pathrecord=packed record
pathindex:integer;//路径纪录的序号
namesize:integer; //路径名称长度
sectorbegin:Integer;//路径起始扇区
// allsector:Integer;//路径占用扇区数 这样控制读取纪录直到下一个文件或夹名称长度为0
parentrecordindex:integer;//父目录序号
pathname:string[255];//名字
end;
implementation
end.
//测试通过了的 lz看看