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,463
  • 3
  • 16
  • 16

1 Answers1

4

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
  • 529,903
  • 94
  • 1,240
  • 1,382