Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Notes > Legacy Documents > Carbon >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Blessed Folder : A How-To Guide

CONTENTS

This Technical Note describes how to determine which folder on an HFS volume is the blessed folder, that is, the folder that contains both the System file and the Finder.

Note:
The following information may be effected by future changes to system software. If you choose to use this information, you must do so at your own risk.

[Jan 01 1988]






Blessing a Folder

The way to bless a folder is by taking the longword which is the directory ID of the blessed folder and putting it into the Master Directory Block (MDB). This can be accomplished by using the HFS call PBSetVInfo. You should not attempt to change this block directly. First call PBHGetVInfo and set ioVFnderInfo[1] to the directory ID of the new folder to be blessed. Then call PBSetVInfo to save this information. Once you have done this, you will find that the Finder takes a little while to realize that you have blessed the folder. Therefore, the icon will take a little while to change. Exactly how long you will have to wait to see the new icon is unknown.

Forcing the icon to change sooner is not a difficult task. The best way for you to see the icon change more quickly is to change the modification date of the directory into which you are copying the new System Folder. Doing this will cause the Finder to reexamine the window and its contents. When the Finder notices that the volume's modification date has changed, it begins scanning for changes in all the open folders. This scanning process takes place about once every 10 seconds. You can change the last modification date for that volume and the System Folder's directory ID for that volume using PBSetVInfo. Changing the file's FndrInfo or renaming the file does not change the modification date. When you call PBSetVInfo you will need to put the System Folder's directory ID in the longword at ioVfndrInfo. This longword will be the first four bytes of this directory ID. (As usual, whenever you make a change to a field of a structure you need to first do a PBGetCatInfo, change what you are going to change, and then do PBSetCatInfo. This ensures that you change only the portion of the volume that you intended, in this case a longword, and not the whole structure.)

Back to top

References

Master Directory Block: Inside Macintosh Volume IV on page 166.

Back to top

Change History

01-Jan-1988

The information about how to find the "Blessed Folder" has been deleted from this technical note. The FindFolder function can now be used to find the "Blessed Folder" and is documented in Inside Macintosh Volume VI, pages 9-42 to 9-44. This note now includes information about how to bless a folder to the new system folder.


Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (size in bytes, size in K)

Download


Back to top