How to open and read resource forks in Obj-C

后端 未结 1 1584
猫巷女王i
猫巷女王i 2021-01-22 00:39

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 *codeFil         


        
相关标签:
1条回答
  • 2021-01-22 01:15

    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".

    0 讨论(0)
提交回复
热议问题