2

I have an old (OS9) file containing a resource fork with "CODE" resources and i would like to read that from Obj-C. I use something like:

NSFileHandle *codeFile=[NSFileHandle fileHandleForReadingAtPath:myPath];

but see only the data fork! Is there any simple solution for that?

I also tried to separate the resource fork with

"CpMac -r myFile newFile" 

but get only the old file back?

pawi
  • 2,343
  • 3
  • 15
  • 16

1 Answers1

3

Opening the path

yourFile/..namedfork/rsrc

gives you access to the resource fork of "yourFile". Alternatively, you can use getxattr(), because the resource fork is stored as an extended attribute named "com.apple.ResourceFork".

Martin R
  • 510,973
  • 84
  • 1,183
  • 1,314