tomc@mntgfx.MENTOR.COM (Tom Carstensen) (09/22/87)
Is there anyway to delete the entire resource fork of a file without deleting the entire file, and then rewriting the data fork of the file? :------------------------------------------------------------: : Tom Carstensen Usenet: tomc@mntgfx.MENTOR.COM : : Mentor Graphics GEnie: : :------------------------------------------------------------:
singer@endor.harvard.edu (Andrew Singer) (09/22/87)
To delete the resource fork, you can do something like this (in pascal): err = OpenRF(fName, vRefNum, path); err = SetEOF(path, fsFromStart, 0); err = FSClose(path); But you might want to consider your reasons for deleting resource forks... --Rich **NOTE: The opinions (if any) stated herein are my own opinions and do not represent the policies of my employer, THINK Technologies, Inc.
earleh@dartvax.UUCP (09/23/87)
In article <933@mntgfx.MENTOR.COM>, tomc@mntgfx.MENTOR.COM (Tom Carstensen) writes: > Is there anyway to delete the entire resource fork of a > file without deleting the entire file, and then rewriting > the data fork of the file? > If you open the resource file with PBOpenRF, then use PBSetEOF to make it zero length, this should work. Alternately, you could parse the resource map for the file, use GetResource for each resource type and ID you find there, then RmveResource to remove it. The first method sounds trivial, the second method sounds like an "interesting programming exercise". Disclaimer: I haven't actually done this... -- ********************************************************************* *Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755 * *********************************************************************