Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site spuxll.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxj!houxm!whuxlm!spuxll!ech From: ech@spuxll.UUCP (Ned Horvath) Newsgroups: net.micro.mac Subject: Re: Help on folders Message-ID: <607@spuxll.UUCP> Date: Thu, 10-Jan-85 00:34:19 EST Article-I.D.: spuxll.607 Posted: Thu Jan 10 00:34:19 1985 Date-Received: Fri, 11-Jan-85 23:35:48 EST References: <1323@dciem.UUCP> Organization: AT&T Information Systems, South Plainfield NJ Lines: 41 You doped it correctly, folders exist only as "virtual" objects, i.e. as resources of type FOBJ in the Desktop. Note that THE Empty Folder has resource ID -1 -- this fits nicely into Inside Mac's folder ID structure of >0 User-defined folders 0 the disk folder -2 the desktop (background) -3 trash Note that you can rename an existing folder 'Empty Folder' (or 'Trash') without drawing a complaint from the finder: it KNOWS that -1 (-3) is the 'true' Empty Folder (Trash). A couple of hours of staring at the Desktop with FEdit will reveal a fair amount of information (I don't have my notes handy) like the folder's name, the window and location of its icon, and the portRect and coordinate origin of its window when open. I haven't yet done the experiment of reading in FOBJ -1, duplicating it, and adding the resource back to the Desktop with a new id an name, but I wouldn't bet a lot of money on being able to fool the Finder that easily (read: I can't account for about half the data in the FOBJ resource!). However, all this stuff is NOT documented in Inside Mac, apparently an intentional omission: the rumor (oft-repeated in these circles of late) is that Apple is still trying to construct a 'true' hierarchical directory structure, thus there is a new Finder on the way, and they don't want to publish the current implementation lest they get committed to it. What IS documented, and hence what you CAN exploit (he said, with a straight face), is the fdFldr in each file's finder information (FInfo) -- see the File Manager doc -- which is indeed the resource ID of the FOBJ for that folder. Since any backup of a disk is going to require that you extract and backup the FInfo anyway, you might as well download and use SetFInfo to restore it. You might as well backup/restore the Desktop file too, thereby capturing all the folders, icons, etc. at one go. The Desktop is currently pretty small -- at least, I have gotten burned when mine approached 10kb. Warning: all of the above is strictly a result of my own observations and best guesses; in particular, documented or not, I wouldn't trust Apple to leave the FInfo struct alone, and I sure wouldn't bet on the FOBJ structure remaining constant. =Ned=