CMGetColorSyncFolderSpec
Obtains the volume reference number and the directory ID for a ColorSync Profiles folder.
Declaration
CMError CMGetColorSyncFolderSpec (
short vRefNum,
Boolean createFolder,
short *foundVRefNum,
long *foundDirID
);Parameters
- vRefNum:
The location of the ColorSync profiles folder. In macOS, pass a constant that specifies one of the four possible locations for ColorSync profiles. Pass
kSystemDomainfor profiles located in:/System/Library/ColorSync/ProfilesPass
kLocalDomainfor profiles located in:/Library/ColorSync/ProfilesPass
kNetworkDomainfor profiles located in:/Network/Library/ColorSync/ProfilesPass
kUserDomainfor profiles located in:~/Library/ColorSync/ProfilesIn Mac OS 9, pass the reference number of the volume to examine. The volume must be mounted. The constant
kOnSystemDiskdefined in the Folders header file (Folders.h) specifies the active system volume. - createFolder:
A flag you set to
trueto direct the ColorSync Manager to create the ColorSync Profiles folder, if it does not exist. You can use the constantskCreateFolderandkDontCreateFolder, defined in theFolders.hheader file, to assign a value to the flag. - foundVRefNum:
A pointer to a volume reference number. On return, the volume reference number for the volume on which the ColorSync Profiles folder resides.
- foundDirID:
A pointer to a directory ID. On return, the directory ID for the volume on which the ColorSync Profiles folder resides.
Return Value
A CMError value. See Result Codes.
Overview
If the ColorSync Profiles folder does not already exist, you can use this function to create it.
Version-Notes
Starting with version 2.5, the name and location of the profile folder changed.
Your application should use the function CMIterateColorSyncFolder, available starting in ColorSync version 2.5, or one of the search functions described in “Searching for Profiles Prior to ColorSync 2.5”, to search for a profile file, even if it is only looking for one file. Do not search for a profile file by obtaining the location of the profiles folder and searching for the file directly.