in reply to Re^4: Edit Macintosh file, keeping resource fork
in thread Edit Macintosh file, keeping resource fork
I made this more complicated than it needs to be. On my Mac OS X system, if I open the file for reading, incrementally read the file and store the modified contents, close the file, reopen the file for writiing, and write the modfiied contents, the resource fork is preserved. I suppose you'll only run into trouble if you create a new file or copy the existing file in such a manner that the resource fork is lost.