ISO 9660: How to locate children of a directory

433 Views Asked by At

Ok so I'm currently working on an assignment in c++ to read from a 9660 level 1 iso image. The goal of the assignment being unpacking the contents to disk. I can get the primary volume descriptor, and can navigate to the root directory and its extent, but I don't know what to do from there.

So how do I find the children based off the root directory record? I guess what I'm trying to understand is how children files and directories are placed in reference to their parent?

I'd actually like a proper answer, not just "read this", as I've already been scouring the internet (reading specifications and so on) trying to figure this out. And either its not well documented or I'm just blind. :(

1

There are 1 best solutions below

0
On BEST ANSWER

So I guess I'll answer my own question. After some experimentation, and hex editing an iso, I found the answer. The children directory records are in fact sequentially after the self and parent "pointer" records. Assuming that the entire sector has been read into a char[2048], to get the next record you just need to increment the pointer by the value stored at offset 0 of the current directory record.