in reply to Read and Extract files (VirtualFS::ISO9660)

The methods you need are humorously unlisted in the public methods section, but the technique is documented in the Synopsis:

$ref = new VirtualFS::ISO9660('file.iso') or die "Can't open file. +iso: $!"; $ref->opendir($dh, '/') or die "Can't open rootdir in file.iso"; # NOTE! ONLY THE 3-ARGUMENT FORM OF open IS SUPPORTED! $ref->open($fh, '<', '/MANIFEST'); print "the MANIFEST file contains:\n"; # this will have to do until perl adds STAT support for tied fileh +andles @stats1 = tied($fh)->STAT; @stats2 = $ref->stat('/MANIFEST'); while (<$fh>) { print "$_\n"; } # unlike closedir, $fh is a "real" (tied) filehandle, and you clos +e it # normally. close $fh;

So it seems you replace the hard-coded "/MANIFEST"with the fully-qualified filename you want off the .iso file and read the thing.

Comments somewhere in the documentation do indicate that there is no concept of a current working directory and all filename references must be fully qualified from root.

Finally, the documentation says binmodedoesn't work, so I'm not sure if you need to switch to something like sysread()to properly read a binary file. But if you're playing with ISO-9660 file systems in Perl, I have to believe you're clever enough to play with it and test it.

I'd test it myself, but ironically and freakishly, I have access to no .iso files in my current location.

Replies are listed 'Best First'.
Re^2: Read and Extract files (VirtualFS::ISO9660)
by james28909 (Deacon) on Apr 23, 2015 at 23:58 UTC
    Well I reckon next time I better read harder. I already got it working. Thanks :)

      You are very welcome. I was glad I could assist.

      Edit - Re-added: Thank you for posting the code you tried up to the point of the question. Even though your question went off into the darkness past the end of your posted code, I probably would not have been able to ascertain what to do if you had not posted it.

      I hope we see more of you around the Monastery. Good blood, as the Klingons say, is always worthy.