I'm writing an app that needs to store an alternate version of a file. Ideally, I'd like it to be transparent for the user - so I avoid to create another file along the original one.
Fortunately, I know from Amit Singh's website (Link) that an HFS+ could have an “arbitrary number of forks”
. If you don't know what it is, I'd recommend to read the previous link.
So, I'm happy as I know I could create a fork in the file - I can store my alternate version & the user doesn't get bothered by another file (that is likely to get deleted because “WTF is that !?”
).
Now, I'd like to know how I'm supposed to create & write to that fork - programmatically, not using any command-line tool. I saw this question (How to open and read resource forks in Obj-C) but it didn't get properly answered.
Thanks in advance !