File Manager Reference
| Framework | CoreServices/CoreServices.h |
| Declared in | Files.h hfs_format.h |
Overview
The File Manager was a core service in OS X that managed the organization, reading, and writing of data located on physical data storage devices such as disk drives. The File Manager was designed to provide an abstraction layer that hides lower-level implementation details such as different file systems and volume formats. For legacy apps that needed to have the same view of the file system seen in the OS X user interface, the File Manager was an appropriate tool. For example, the File Manager was often used in application frameworks such as Carbon and Cocoa to implement file-related operations.
A number of deprecated functions in the File Manager were inherited from earlier versions of Mac OS and have been carried along to facilitate porting legacy applications to OS X. You should avoid using these deprecated functions. In particular, you should avoid any function or data structure that uses the FSSpec data type. This reference document clearly marks every deprecated function and, in most cases, provides a recommended replacement.
Functions by Task
Accessing Information About Files and Directories
-
FSpGetFInfoDeprecated in OS X v10.4 -
FSpSetFInfoDeprecated in OS X v10.4 -
HGetFInfoDeprecated in OS X v10.4 -
HSetFInfoDeprecated in OS X v10.4 -
PBGetCatInfoAsyncDeprecated in OS X v10.4 -
PBGetCatInfoSyncDeprecated in OS X v10.4 -
PBHGetFInfoAsyncDeprecated in OS X v10.4 -
PBHGetFInfoSyncDeprecated in OS X v10.4 -
PBHSetFInfoAsyncDeprecated in OS X v10.4 -
PBHSetFInfoSyncDeprecated in OS X v10.4 -
PBSetCatInfoAsyncDeprecated in OS X v10.4 -
PBSetCatInfoSyncDeprecated in OS X v10.4 -
FSGetCatalogInfoDeprecated in OS X v10.8 -
FSSetCatalogInfoDeprecated in OS X v10.8 -
PBGetCatalogInfoAsyncDeprecated in OS X v10.8 -
PBGetCatalogInfoSyncDeprecated in OS X v10.8 -
PBSetCatalogInfoAsyncDeprecated in OS X v10.8 -
PBSetCatalogInfoSyncDeprecated in OS X v10.8
Accessing the Desktop Database
-
PBDTAddAPPLAsyncDeprecated in OS X v10.4 -
PBDTAddAPPLSyncDeprecated in OS X v10.4 -
PBDTAddIconAsyncDeprecated in OS X v10.4 -
PBDTAddIconSyncDeprecated in OS X v10.4 -
PBDTCloseDownDeprecated in OS X v10.4 -
PBDTDeleteAsyncDeprecated in OS X v10.4 -
PBDTDeleteSyncDeprecated in OS X v10.4 -
PBDTFlushAsyncDeprecated in OS X v10.4 -
PBDTFlushSyncDeprecated in OS X v10.4 -
PBDTGetAPPLAsyncDeprecated in OS X v10.4 -
PBDTGetAPPLSyncDeprecated in OS X v10.4 -
PBDTGetCommentAsyncDeprecated in OS X v10.4 -
PBDTGetCommentSyncDeprecated in OS X v10.4 -
PBDTGetIconAsyncDeprecated in OS X v10.4 -
PBDTGetIconInfoAsyncDeprecated in OS X v10.4 -
PBDTGetIconInfoSyncDeprecated in OS X v10.4 -
PBDTGetIconSyncDeprecated in OS X v10.4 -
PBDTGetInfoAsyncDeprecated in OS X v10.4 -
PBDTGetInfoSyncDeprecated in OS X v10.4 -
PBDTGetPathDeprecated in OS X v10.4 -
PBDTOpenInformDeprecated in OS X v10.4 -
PBDTRemoveAPPLAsyncDeprecated in OS X v10.4 -
PBDTRemoveAPPLSyncDeprecated in OS X v10.4 -
PBDTRemoveCommentAsyncDeprecated in OS X v10.4 -
PBDTRemoveCommentSyncDeprecated in OS X v10.4 -
PBDTResetAsyncDeprecated in OS X v10.4 -
PBDTResetSyncDeprecated in OS X v10.4 -
PBDTSetCommentAsyncDeprecated in OS X v10.4 -
PBDTSetCommentSyncDeprecated in OS X v10.4
Allocating Storage for Files
-
AllocateDeprecated in OS X v10.4 -
AllocContigDeprecated in OS X v10.4 -
PBAllocateAsyncDeprecated in OS X v10.4 -
PBAllocateSyncDeprecated in OS X v10.4 -
PBAllocContigAsyncDeprecated in OS X v10.4 -
PBAllocContigSyncDeprecated in OS X v10.4 -
FSAllocateForkDeprecated in OS X v10.8 -
PBAllocateForkAsyncDeprecated in OS X v10.8 -
PBAllocateForkSyncDeprecated in OS X v10.8
Changing File Permissions, ACLs, and Ownership
-
FSFileSecuritySetAccessControlListDeprecated in OS X v10.8 -
FSFileSecuritySetGroupDeprecated in OS X v10.8 -
FSFileSecuritySetGroupUUIDDeprecated in OS X v10.8 -
FSFileSecuritySetModeDeprecated in OS X v10.8 -
FSFileSecuritySetOwnerDeprecated in OS X v10.8 -
FSFileSecuritySetOwnerUUIDDeprecated in OS X v10.8
Closing Files
-
PBCloseAsyncDeprecated in OS X v10.5 -
PBCloseSyncDeprecated in OS X v10.5 -
FSCloseDeprecated in OS X v10.4 -
FSCloseForkDeprecated in OS X v10.8 -
PBCloseForkAsyncDeprecated in OS X v10.8 -
PBCloseForkSyncDeprecated in OS X v10.8
Comparing File System References
-
FSCompareFSRefsDeprecated in OS X v10.8 -
PBCompareFSRefsAsyncDeprecated in OS X v10.8 -
PBCompareFSRefsSyncDeprecated in OS X v10.8
Controlling Directory Access
-
PBHGetDirAccessAsyncDeprecated in OS X v10.5 -
PBHGetDirAccessSyncDeprecated in OS X v10.5 -
PBHSetDirAccessAsyncDeprecated in OS X v10.5 -
PBHSetDirAccessSyncDeprecated in OS X v10.5
Controlling Login Access
-
PBHMapIDAsyncDeprecated in OS X v10.5 -
PBHMapIDSyncDeprecated in OS X v10.5 -
PBHMapNameAsyncDeprecated in OS X v10.5 -
PBHMapNameSyncDeprecated in OS X v10.5 -
PBHGetLogInInfoAsyncDeprecated in OS X v10.4
Converting Between Paths and FSRef Structures
-
FSPathMakeRefDeprecated in OS X v10.8 -
FSPathMakeRefWithOptionsDeprecated in OS X v10.8 -
FSRefMakePathDeprecated in OS X v10.8
Copying and Moving Files
-
PBHCopyFileAsyncDeprecated in OS X v10.5 -
PBHCopyFileSyncDeprecated in OS X v10.5 -
PBHMoveRenameAsyncDeprecated in OS X v10.4 -
PBHMoveRenameSyncDeprecated in OS X v10.4 -
PBFSCopyFileAsyncDeprecated in OS X v10.8 -
PBFSCopyFileSyncDeprecated in OS X v10.8
Copying and Moving Objects Using Asynchronous High-Level File Operations
-
FSMoveObjectAsync -
FSPathMoveObjectAsync -
FSCopyObjectAsyncDeprecated in OS X v10.8 -
FSFileOperationCancelDeprecated in OS X v10.8 -
FSFileOperationCopyStatusDeprecated in OS X v10.8 -
FSFileOperationCreateDeprecated in OS X v10.8 -
FSFileOperationGetTypeIDDeprecated in OS X v10.8 -
FSFileOperationScheduleWithRunLoopDeprecated in OS X v10.8 -
FSFileOperationUnscheduleFromRunLoopDeprecated in OS X v10.8 -
FSMoveObjectToTrashAsyncDeprecated in OS X v10.8 -
FSPathCopyObjectAsyncDeprecated in OS X v10.8 -
FSPathFileOperationCopyStatusDeprecated in OS X v10.8 -
FSPathMoveObjectToTrashAsyncDeprecated in OS X v10.8
Copying and Moving Objects Using Synchronous High-Level File Operations
-
FSCopyObjectSyncDeprecated in OS X v10.8 -
FSMoveObjectSyncDeprecated in OS X v10.8 -
FSMoveObjectToTrashSyncDeprecated in OS X v10.8 -
FSPathCopyObjectSyncDeprecated in OS X v10.8 -
FSPathMoveObjectSyncDeprecated in OS X v10.8 -
FSPathMoveObjectToTrashSyncDeprecated in OS X v10.8
Creating a File System Reference (FSRef)
-
FSpMakeFSRefDeprecated in OS X v10.5 -
PBMakeFSRefAsyncDeprecated in OS X v10.5 -
PBMakeFSRefSyncDeprecated in OS X v10.5 -
FSIsFSRefValidDeprecated in OS X v10.8 -
FSMakeFSRefUnicodeDeprecated in OS X v10.8 -
PBMakeFSRefUnicodeAsyncDeprecated in OS X v10.8 -
PBMakeFSRefUnicodeSyncDeprecated in OS X v10.8
Creating and Deleting File ID References
-
PBCreateFileIDRefAsyncDeprecated in OS X v10.5 -
PBCreateFileIDRefSyncDeprecated in OS X v10.5 -
PBDeleteFileIDRefAsyncDeprecated in OS X v10.5 -
PBDeleteFileIDRefSyncDeprecated in OS X v10.5
Creating and Deleting Named Forks
-
FSCreateForkDeprecated in OS X v10.8 -
FSDeleteForkDeprecated in OS X v10.8 -
PBCreateForkAsyncDeprecated in OS X v10.8 -
PBCreateForkSyncDeprecated in OS X v10.8 -
PBDeleteForkAsyncDeprecated in OS X v10.8 -
PBDeleteForkSyncDeprecated in OS X v10.8
Creating Directories
-
DirCreateDeprecated in OS X v10.4 -
FSpDirCreateDeprecated in OS X v10.4 -
PBDirCreateAsyncDeprecated in OS X v10.4 -
PBDirCreateSyncDeprecated in OS X v10.4 -
FSCreateDirectoryUnicodeDeprecated in OS X v10.8 -
PBCreateDirectoryUnicodeAsyncDeprecated in OS X v10.8 -
PBCreateDirectoryUnicodeSyncDeprecated in OS X v10.8
Creating FSFileSecurity Objects
-
FSFileSecurityCreateDeprecated in OS X v10.8 -
FSFileSecurityCreateWithFSPermissionInfoDeprecated in OS X v10.8 -
FSFileSecurityRefCreateCopyDeprecated in OS X v10.8
Creating File System Specifications
-
FSMakeFSSpecDeprecated in OS X v10.4 -
PBMakeFSSpecAsyncDeprecated in OS X v10.4 -
PBMakeFSSpecSyncDeprecated in OS X v10.4
Creating Files
-
FSpCreateDeprecated in OS X v10.4 -
HCreateDeprecated in OS X v10.4 -
PBHCreateAsyncDeprecated in OS X v10.4 -
PBHCreateSyncDeprecated in OS X v10.4 -
FSCreateFileAndOpenForkUnicodeDeprecated in OS X v10.8 -
FSCreateFileUnicodeDeprecated in OS X v10.8 -
PBCreateFileUnicodeAsyncDeprecated in OS X v10.8 -
PBCreateFileUnicodeSyncDeprecated in OS X v10.8
Creating, Calling, and Deleting Universal Procedure Pointers
-
DisposeFNSubscriptionUPPDeprecated in OS X v10.8 -
DisposeFSVolumeEjectUPPDeprecated in OS X v10.8 -
DisposeFSVolumeMountUPPDeprecated in OS X v10.8 -
DisposeFSVolumeUnmountUPPDeprecated in OS X v10.8 -
DisposeIOCompletionUPPDeprecated in OS X v10.8 -
InvokeFNSubscriptionUPPDeprecated in OS X v10.8 -
InvokeFSVolumeEjectUPPDeprecated in OS X v10.8 -
InvokeFSVolumeMountUPPDeprecated in OS X v10.8 -
InvokeFSVolumeUnmountUPPDeprecated in OS X v10.8 -
InvokeIOCompletionUPPDeprecated in OS X v10.8 -
NewFNSubscriptionUPPDeprecated in OS X v10.8 -
NewFSVolumeEjectUPPDeprecated in OS X v10.8 -
NewFSVolumeMountUPPDeprecated in OS X v10.8 -
NewFSVolumeUnmountUPPDeprecated in OS X v10.8 -
NewIOCompletionUPPDeprecated in OS X v10.8
Deleting Files and Directories
-
FSpDeleteDeprecated in OS X v10.4 -
HDeleteDeprecated in OS X v10.4 -
PBHDeleteAsyncDeprecated in OS X v10.4 -
PBHDeleteSyncDeprecated in OS X v10.4 -
FSDeleteObjectDeprecated in OS X v10.8 -
FSUnlinkObjectDeprecated in OS X v10.8 -
PBDeleteObjectAsyncDeprecated in OS X v10.8 -
PBDeleteObjectSyncDeprecated in OS X v10.8
Determining the Unicode Names of the Data and Resource Forks
-
FSGetDataForkNameDeprecated in OS X v10.8 -
FSGetResourceForkNameDeprecated in OS X v10.8
Exchanging the Contents of Two Files
-
FSpExchangeFilesDeprecated in OS X v10.4 -
PBExchangeFilesAsyncDeprecated in OS X v10.4 -
PBExchangeFilesSyncDeprecated in OS X v10.4 -
FSExchangeObjectsDeprecated in OS X v10.8 -
PBExchangeObjectsAsyncDeprecated in OS X v10.8 -
PBExchangeObjectsSyncDeprecated in OS X v10.8
Getting and Setting Volume Information
-
GetVRefNumDeprecated in OS X v10.4 -
PBHGetVInfoAsyncDeprecated in OS X v10.4 -
PBHGetVInfoSyncDeprecated in OS X v10.4 -
PBSetVInfoAsyncDeprecated in OS X v10.4 -
PBSetVInfoSyncDeprecated in OS X v10.4 -
PBXGetVolInfoAsyncDeprecated in OS X v10.4 -
PBXGetVolInfoSyncDeprecated in OS X v10.4 -
FSCopyDADiskForVolumeDeprecated in OS X v10.8 -
FSCopyDiskIDForVolumeDeprecated in OS X v10.8 -
FSCopyURLForVolumeDeprecated in OS X v10.8 -
FSGetVolumeForDADiskDeprecated in OS X v10.8 -
FSGetVolumeForDiskIDDeprecated in OS X v10.8 -
FSGetVolumeInfoDeprecated in OS X v10.8 -
FSSetVolumeInfoDeprecated in OS X v10.8 -
PBGetVolumeInfoAsyncDeprecated in OS X v10.8 -
PBGetVolumeInfoSyncDeprecated in OS X v10.8 -
PBSetVolumeInfoAsyncDeprecated in OS X v10.8 -
PBSetVolumeInfoSyncDeprecated in OS X v10.8
Getting Volume Attributes
-
PBHGetVolParmsAsyncDeprecated in OS X v10.5 -
PBHGetVolParmsSyncDeprecated in OS X v10.5 -
FSGetVolumeParmsDeprecated in OS X v10.8
Iterating Over Named Forks
-
FSIterateForksDeprecated in OS X v10.8 -
PBIterateForksAsyncDeprecated in OS X v10.8 -
PBIterateForksSyncDeprecated in OS X v10.8
Locking and Unlocking File Ranges
-
PBLockRangeAsyncDeprecated in OS X v10.4 -
PBLockRangeSyncDeprecated in OS X v10.4 -
PBUnlockRangeAsyncDeprecated in OS X v10.4 -
PBUnlockRangeSyncDeprecated in OS X v10.4 -
FSLockRangeDeprecated in OS X v10.8 -
FSUnlockRangeDeprecated in OS X v10.8 -
PBXLockRangeAsyncDeprecated in OS X v10.8 -
PBXLockRangeSyncDeprecated in OS X v10.8 -
PBXUnlockRangeAsyncDeprecated in OS X v10.8 -
PBXUnlockRangeSyncDeprecated in OS X v10.8
Locking and Unlocking Files and Directories
-
FSpRstFLockDeprecated in OS X v10.4 -
FSpSetFLockDeprecated in OS X v10.4 -
HRstFLockDeprecated in OS X v10.4 -
HSetFLockDeprecated in OS X v10.4 -
PBHRstFLockAsyncDeprecated in OS X v10.4 -
PBHRstFLockSyncDeprecated in OS X v10.4 -
PBHSetFLockAsyncDeprecated in OS X v10.4 -
PBHSetFLockSyncDeprecated in OS X v10.4
Manipulating File and Fork Size
-
GetEOFDeprecated in OS X v10.4 -
PBGetEOFAsyncDeprecated in OS X v10.4 -
PBGetEOFSyncDeprecated in OS X v10.4 -
PBSetEOFAsyncDeprecated in OS X v10.4 -
PBSetEOFSyncDeprecated in OS X v10.4 -
SetEOFDeprecated in OS X v10.4 -
FSGetForkSizeDeprecated in OS X v10.8 -
FSSetForkSizeDeprecated in OS X v10.8 -
PBGetForkSizeAsyncDeprecated in OS X v10.8 -
PBGetForkSizeSyncDeprecated in OS X v10.8 -
PBSetForkSizeAsyncDeprecated in OS X v10.8 -
PBSetForkSizeSyncDeprecated in OS X v10.8
Manipulating File Position
-
GetFPosDeprecated in OS X v10.4 -
PBGetFPosAsyncDeprecated in OS X v10.4 -
PBGetFPosSyncDeprecated in OS X v10.4 -
PBSetFPosAsyncDeprecated in OS X v10.4 -
PBSetFPosSyncDeprecated in OS X v10.4 -
SetFPosDeprecated in OS X v10.4 -
FSGetForkPositionDeprecated in OS X v10.8 -
FSSetForkPositionDeprecated in OS X v10.8 -
PBGetForkPositionAsyncDeprecated in OS X v10.8 -
PBGetForkPositionSyncDeprecated in OS X v10.8 -
PBSetForkPositionAsyncDeprecated in OS X v10.8 -
PBSetForkPositionSyncDeprecated in OS X v10.8
Manipulating the Default Volume
-
HGetVolDeprecated in OS X v10.4 -
HSetVolDeprecated in OS X v10.4 -
PBHGetVolAsyncDeprecated in OS X v10.4 -
PBHGetVolSyncDeprecated in OS X v10.4 -
PBHSetVolAsyncDeprecated in OS X v10.4 -
PBHSetVolSyncDeprecated in OS X v10.4
Mounting and Unmounting Volumes
-
PBUnmountVolDeprecated in OS X v10.4 -
UnmountVolDeprecated in OS X v10.4 -
FSCancelVolumeOperationDeprecated in OS X v10.8 -
FSCreateVolumeOperationDeprecated in OS X v10.8 -
FSDisposeVolumeOperationDeprecated in OS X v10.8 -
FSEjectVolumeAsyncDeprecated in OS X v10.8 -
FSEjectVolumeSyncDeprecated in OS X v10.8 -
FSGetAsyncEjectStatusDeprecated in OS X v10.8 -
FSGetAsyncMountStatusDeprecated in OS X v10.8 -
FSGetAsyncUnmountStatusDeprecated in OS X v10.8 -
FSMountLocalVolumeAsyncDeprecated in OS X v10.8 -
FSMountLocalVolumeSyncDeprecated in OS X v10.8 -
FSMountServerVolumeAsyncDeprecated in OS X v10.8 -
FSMountServerVolumeSyncDeprecated in OS X v10.8 -
FSUnmountVolumeAsyncDeprecated in OS X v10.8 -
FSUnmountVolumeSyncDeprecated in OS X v10.8
Mounting Remote Volumes
-
PBGetVolMountInfoDeprecated in OS X v10.5 -
PBGetVolMountInfoSizeDeprecated in OS X v10.5 -
PBVolumeMountDeprecated in OS X v10.5 -
FSGetVolumeMountInfoDeprecated in OS X v10.8 -
FSGetVolumeMountInfoSizeDeprecated in OS X v10.8 -
FSVolumeMountDeprecated in OS X v10.8
Moving, Renaming, or Replacing Files or Directories
-
CatMoveDeprecated in OS X v10.4 -
FSpCatMoveDeprecated in OS X v10.4 -
FSpRenameDeprecated in OS X v10.4 -
HRenameDeprecated in OS X v10.4 -
PBCatMoveAsyncDeprecated in OS X v10.4 -
PBCatMoveSyncDeprecated in OS X v10.4 -
PBHRenameAsyncDeprecated in OS X v10.4 -
PBHRenameSyncDeprecated in OS X v10.4 -
FSGetTemporaryDirectoryForReplaceObjectDeprecated in OS X v10.8 -
FSMoveObjectDeprecated in OS X v10.8 -
FSPathGetTemporaryDirectoryForReplaceObjectDeprecated in OS X v10.8 -
FSPathReplaceObjectDeprecated in OS X v10.8 -
FSRenameUnicodeDeprecated in OS X v10.8 -
FSReplaceObjectDeprecated in OS X v10.8 -
PBMoveObjectAsyncDeprecated in OS X v10.8 -
PBMoveObjectSyncDeprecated in OS X v10.8 -
PBRenameUnicodeAsyncDeprecated in OS X v10.8 -
PBRenameUnicodeSyncDeprecated in OS X v10.8
Obtaining File and Directory Information Using a Catalog Iterator on HFS Plus Volumes
-
FSGetCatalogInfoBulkDeprecated in OS X v10.8 -
PBGetCatalogInfoBulkAsyncDeprecated in OS X v10.8 -
PBGetCatalogInfoBulkSyncDeprecated in OS X v10.8
Obtaining File Control Block Information
-
PBGetFCBInfoAsyncDeprecated in OS X v10.4 -
PBGetFCBInfoSyncDeprecated in OS X v10.4
Obtaining File Permissions, ACLs, and Ownership Information
-
FSFileSecurityCopyAccessControlListDeprecated in OS X v10.8 -
FSFileSecurityGetGroupDeprecated in OS X v10.8 -
FSFileSecurityGetGroupUUIDDeprecated in OS X v10.8 -
FSFileSecurityGetModeDeprecated in OS X v10.8 -
FSFileSecurityGetOwnerDeprecated in OS X v10.8 -
FSFileSecurityGetOwnerUUIDDeprecated in OS X v10.8 -
FSFileSecurityGetTypeIDDeprecated in OS X v10.8
Obtaining Fork Control Block Information
-
FSGetForkCBInfoDeprecated in OS X v10.8 -
PBGetForkCBInfoAsyncDeprecated in OS X v10.8 -
PBGetForkCBInfoSyncDeprecated in OS X v10.8
Opening Files
-
FSpOpenDFDeprecated in OS X v10.4 -
FSpOpenRFDeprecated in OS X v10.4 -
HOpenDeprecated in OS X v10.4 -
HOpenDFDeprecated in OS X v10.4 -
HOpenRFDeprecated in OS X v10.4 -
PBHOpenAsyncDeprecated in OS X v10.4 -
PBHOpenDFAsyncDeprecated in OS X v10.4 -
PBHOpenDFSyncDeprecated in OS X v10.4 -
PBHOpenRFAsyncDeprecated in OS X v10.4 -
PBHOpenRFSyncDeprecated in OS X v10.4 -
PBHOpenSyncDeprecated in OS X v10.4 -
FSOpenForkDeprecated in OS X v10.8 -
PBOpenForkAsyncDeprecated in OS X v10.8 -
PBOpenForkSyncDeprecated in OS X v10.8
Opening Files While Denying Access
-
PBHOpenDenyAsyncDeprecated in OS X v10.5 -
PBHOpenDenySyncDeprecated in OS X v10.5 -
PBHOpenRFDenyAsyncDeprecated in OS X v10.5 -
PBHOpenRFDenySyncDeprecated in OS X v10.5
Reading and Writing Files
-
PBReadAsyncDeprecated in OS X v10.5 -
PBReadSyncDeprecated in OS X v10.5 -
PBWriteAsyncDeprecated in OS X v10.5 -
PBWriteSyncDeprecated in OS X v10.5 -
FSReadDeprecated in OS X v10.4 -
FSWriteDeprecated in OS X v10.4 -
FSReadForkDeprecated in OS X v10.8 -
FSWriteForkDeprecated in OS X v10.8 -
PBReadForkAsyncDeprecated in OS X v10.8 -
PBReadForkSyncDeprecated in OS X v10.8 -
PBWriteForkAsyncDeprecated in OS X v10.8 -
PBWriteForkSyncDeprecated in OS X v10.8
Resolving File ID References
-
PBResolveFileIDRefAsyncDeprecated in OS X v10.5 -
PBResolveFileIDRefSyncDeprecated in OS X v10.5
Searching a Volume
-
PBCatSearchAsyncDeprecated in OS X v10.4 -
PBCatSearchSyncDeprecated in OS X v10.4
Searching a Volume Using a Catalog Iterator
-
FSCatalogSearchDeprecated in OS X v10.8 -
FSCloseIteratorDeprecated in OS X v10.8 -
FSOpenIteratorDeprecated in OS X v10.8 -
PBCatalogSearchAsyncDeprecated in OS X v10.8 -
PBCatalogSearchSyncDeprecated in OS X v10.8 -
PBCloseIteratorAsyncDeprecated in OS X v10.8 -
PBCloseIteratorSyncDeprecated in OS X v10.8 -
PBOpenIteratorAsyncDeprecated in OS X v10.8 -
PBOpenIteratorSyncDeprecated in OS X v10.8
Updating Files
-
PBFlushFileAsyncDeprecated in OS X v10.4 -
PBFlushFileSyncDeprecated in OS X v10.4 -
FSFlushForkDeprecated in OS X v10.8 -
PBFlushForkAsyncDeprecated in OS X v10.8 -
PBFlushForkSyncDeprecated in OS X v10.8
Updating Volumes
-
FlushVolDeprecated in OS X v10.5 -
PBFlushVolAsyncDeprecated in OS X v10.5 -
PBFlushVolSyncDeprecated in OS X v10.5 -
FSFlushVolumeDeprecated in OS X v10.8 -
PBFlushVolumeAsyncDeprecated in OS X v10.8 -
PBFlushVolumeSyncDeprecated in OS X v10.8
Using Change Notifications
-
FNGetDirectoryForSubscriptionDeprecated in OS X v10.8 -
FNNotifyDeprecated in OS X v10.8 -
FNNotifyAllDeprecated in OS X v10.8 -
FNNotifyByPathDeprecated in OS X v10.8 -
FNSubscribeDeprecated in OS X v10.8 -
FNSubscribeByPathDeprecated in OS X v10.8 -
FNUnsubscribeDeprecated in OS X v10.8
Not Recommended
This section lists functions that are not recommended and you should no longer use.
-
PBWaitIOCompleteDeprecated in OS X v10.5 -
PBGetForeignPrivsAsyncDeprecated in OS X v10.4 -
PBGetForeignPrivsSyncDeprecated in OS X v10.4 -
PBGetUGEntryAsyncDeprecated in OS X v10.4 -
PBGetUGEntrySyncDeprecated in OS X v10.4 -
PBGetXCatInfoAsyncDeprecated in OS X v10.4 -
PBGetXCatInfoSyncDeprecated in OS X v10.4 -
PBHGetLogInInfoSyncDeprecated in OS X v10.4 -
PBSetForeignPrivsAsyncDeprecated in OS X v10.4 -
PBSetForeignPrivsSyncDeprecated in OS X v10.4 -
PBShareAsyncDeprecated in OS X v10.4 -
PBShareSyncDeprecated in OS X v10.4 -
PBUnshareAsyncDeprecated in OS X v10.4 -
PBUnshareSyncDeprecated in OS X v10.4
Callbacks by Task
File Operation Callbacks
-
FSPathFileOperationStatusProcPtrDeprecated in OS X v10.8 -
FSFileOperationStatusProcPtrDeprecated in OS X v10.8
Miscellaneous Callbacks
Callbacks
FNSubscriptionProcPtr
Callback delivered for directory notifications.
typedef void (*FNSubscriptionProcPtr) ( FNMessage message, OptionBits flags, void * refcon, FNSubscriptionRef subscription );
If you name your function MyFNSubscriptionProc, you would declare it like this:
void MyFNSubscriptionProc ( FNMessage message, OptionBits flags, void * refcon, FNSubscriptionRef subscription );
Parameters
- message
An indication of what happened.
- flags
Options regarding the delivery of the notification; typically
kNilOptions.- refcon
A pointer to a user reference supplied with subscription.
- subscription
A subscription corresponding to this notification.
Availability
- Available in OS X v10.1 and later.
Declared In
Files.hFSFileOperationStatusProcPtr
Defines a status callback function for an asynchronous file operation on an FSRef object.
typedef void (*FSFileOperationStatusProcPtr) ( FSFileOperationRef fileOp, const FSRef *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info );
If you name your function MyFSFileOperationStatusProc, you would declare it like this:
void MyFSFileOperationStatusProc ( FSFileOperationRef fileOp, const FSRef *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info );
Parameters
- fileOp
The file operation.
- currentItem
A pointer to an
FSRefvariable. On output, the variable contains the object currently being moved or copied. If the operation is complete, this parameter refers to the target (the new object corresponding to the source object in the destination directory).- stage
The current stage of the operation.
- error
The current error status of the operation.
- statusDictionary
A dictionary with more detailed status information. For information about the contents of the dictionary, see
“File Operation Status Dictionary Keys”. You are not responsible for releasing the dictionary.- info
A pointer to user-defined data associated with this operation.
Discussion
When you call FSCopyObjectAsync, FSMoveObjectAsync, or FSMoveObjectToTrashAsync, you can specify a status callback function of this type. The function you provide is called by the File Manager whenever the file operation changes stages (including failing due to an error), or as updated information is available limited by the status change interval of the operation. If you need to save any of the status information beyond the scope of the callback, you should make a copy of the information.
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSPathFileOperationStatusProcPtr
Defines a status callback function for an asynchronous file operation on an object specified with a pathname.
typedef void (*FSPathFileOperationStatusProcPtr) ( FSFileOperationRef fileOp, const char *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info );
If you name your function MyFSPathFileOperationStatusProc, you would declare it like this:
void MyFSPathFileOperationStatusProc ( FSFileOperationRef fileOp, const char *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info );
Parameters
- fileOp
The file operation.
- currentItem
The UTF-8 pathname of the object currently being moved or copied. If the operation is complete, this parameter refers to the target (the new object corresponding to the source object in the destination directory).
- stage
The current stage of the operation.
- error
The current error status of the operation.
- statusDictionary
A dictionary with more detailed status information. For information about the contents of the dictionary, see
“File Operation Status Dictionary Keys”. You are not responsible for releasing the dictionary.- info
A pointer to user-defined data associated with this operation.
Discussion
When you call FSPathCopyObjectAsync, FSPathMoveObjectAsync, or FSPathMoveObjectToTrashAsync, you can specify a status callback function of this type. The function you provide is called by the File Manager whenever the file operation changes stages (including failing due to an error), or as updated information is available limited by the status change interval of the operation. If you need to save any of the status information beyond the scope of the callback, you should make a copy of the information.
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSVolumeEjectProcPtr
typedef void (*FSVolumeEjectProcPtr) ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter );
If you name your function MyFSVolumeEjectProc, you would declare it like this:
void MyFSVolumeEjectProc ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter );
Parameters
- volumeOp
- clientData
- err
- volumeRefNum
- dissenter
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeMountProcPtr
typedef void (*FSVolumeMountProcPtr) ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum mountedVolumeRefNum );
If you name your function MyFSVolumeMountProc, you would declare it like this:
void MyFSVolumeMountProc ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum mountedVolumeRefNum );
Parameters
- volumeOp
- clientData
- err
- mountedVolumeRefNum
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeUnmountProcPtr
typedef void (*FSVolumeUnmountProcPtr) ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter );
If you name your function MyFSVolumeUnmountProc, you would declare it like this:
void MyFSVolumeUnmountProc ( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter );
Parameters
- volumeOp
- clientData
- err
- volumeRefNum
- dissenter
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hIOCompletionProcPtr
Defines a pointer to a completion function. Your completion function is executed by the File Manager after the completion of an asynchronous File Manager function call.
typedef void (*IOCompletionProcPtr) ( ParmBlkPtr paramBlock );
If you name your function MyIOCompletionProc, you would declare it like this:
void MyIOCompletionProc ( ParmBlkPtr paramBlock );
Parameters
- paramBlock
A pointer to the parameter block that was passed to the asynchronous File Manager function.
Return Value
Discussion
When you execute an asynchronous File Manager function (an Async function), you can specify a completion routine by passing the routine’s address in the ioCompletion field of the parameter block passed to the function. Because you requested asynchronous execution, the File Manager places an I/O request in the file I/O queue and returns control to your application—possibly even before the actual I/O operation is completed. The File Manager takes requests from the queue one at a time and processes them meanwhile, your application is free to do other processing.
A function executed asynchronously returns control to your application with the result code noErr as soon as the call is placed in the file I/O queue. This result code does not indicate that the call has successfully completed, but simply indicates that the call was successfully placed in the queue. To determine when the call is actually completed, you can inspect the ioResult field of the parameter block. This field is set to a positive number when the call is made and set to the actual result code when the call is completed. If you specify a completion routine, it is executed after the result code is placed in ioResult.
The File Manager, when the File Sharing or AppleShare file server is active, will execute requests in arbitrary order. That means that if there is a request that depends on the completion of a previous request, it is an error for your program to issue the second request until the completion of the first request. For example, issuing a write request and then issuing a read request for the same data isn't guaranteed to read back what was written unless the read request isn't made until after the write request completes.
Request order can also change if a call results in a disk switch dialog to bring an offline volume back online.
Special Considerations
Because a completion routine is executed at interrupt time, it should not allocate, move, or purge memory (either directly or indirectly) and should not depend on the validity of handles to unlocked blocks.
If your completion routine uses application global variables, it must also ensure that register A5 contains the address of the boundary between your application global variables and your application parameters.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hData Types
AccessParam
Defines a parameter block used by low-level HFS file and directory access rights manipulation functions.
struct AccessParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short filler3;
short ioDenyModes;
short filler4;
SInt8 filler5;
SInt8 ioACUser;
long filler6;
long ioACOwnerID;
long ioACGroupID;
long ioACAccess;
long ioDirID;
};
typedef struct AccessParam AccessParam;
typedef AccessParam * AccessParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler3Reserved.
ioDenyModesAccess mode information.
filler4Reserved.
filler5Reserved.
ioACUserThe user’s access rights for the specified directory.
filler6Reserved.
ioACOwnerIDThe owner ID.
ioACGroupIDThe group ID.
ioACAccessThe directory access privileges.
ioDirID
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hAFPAlternateAddress
Defines a block of tagged addresses for AppleShare clients.
struct AFPAlternateAddress {
UInt8 fVersion;
UInt8 fAddressCount;
UInt8 fAddressList[1];
};
typedef struct AFPAlternateAddress AFPAlternateAddress;
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hAFPTagData
Defines a structure which contains tagged address information for AppleShare clients.
struct AFPTagData {
UInt8 fLength;
UInt8 fType;
UInt8 fData[1];
};
typedef struct AFPTagData AFPTagData;
Fields
fLengthThe length, in bytes, of this data tag, including the
fLengthfield itself. See “AFP Tag Length Constants.”fTypeThe type of the data tag. See “AFP Tag Type Constants” for the constants which you can use here.
fDataVariable length data, containing the address.
Discussion
The new tagged data format for addressing allows for changes in addressing formats, allowing AppleShare clients to support new addressing standards without changing the interface. The AFPAlternateAddress data structure uses the AFPTagData structure to specify a tagged address.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hAFPVolMountInfo
Defines a volume mounting structure for an AppleShare server.
struct AFPVolMountInfo {
short length;
VolumeType media;
short flags;
SInt8 nbpInterval;
SInt8 nbpCount;
short uamType;
short zoneNameOffset;
short serverNameOffset;
short volNameOffset;
short userNameOffset;
short userPasswordOffset;
short volPasswordOffset;
char AFPData[144];
};
typedef struct AFPVolMountInfo AFPVolMountInfo;
typedef AFPVolMountInfo * AFPVolMountInfoPtr;
Fields
lengthThe length of the
AFPVolMountInfostructure (that is, the total length of the structure header described here plus the variable-length location data).mediaThe volume type of the remote volume. The value
AppleShareMediaType(a constant that translates to'afpm') represents an AppleShare volume.flagsIf bit 0 is set, no greeting message from the server is displayed.
nbpIntervalThe NBP retransmit interval, in units of 8 ticks.
nbpCountThe NBP retransmit count. This field specifies the total number of times a packet should be transmitted, including the first transmission.
uamTypeThe user authentication method used by the remote volume. AppleShare uses four methods, defined by the constants described in “Authentication Method Constants.”
zoneNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the AppleShare zone.serverNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the AppleShare server.volNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the volume.userNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the user.userPasswordOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the user’s password (as a pascal string).volPasswordOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the volume’s password (as a pascal string). Some versions of the AppleShare software do not pass the information in this field to the server.AFPDataThe actual volume mounting information, offsets to which are contained in the preceding six fields. To mount an AFP volume, you must fill in the structure with at least the zone name, server name, user name, user password, and volume password. You can lay out the data in any order within this data field, as long as you specify the correct offsets in the offset fields.
Discussion
The only volumes that currently support the programmatic mounting functions are AppleShare servers, which use a volume mounting structure of type AFPVolMountInfo.
To mount an AppleShare server, fill out an AFPVolMountInfo structure using the PBGetVolMountInfo function and then pass this structure to the PBVolumeMount function to mount the volume.
Version Notes
AppleShare clients prior to version 3.7 mount volumes over AppleTalk only. For maximum compatibility set the uamType field to 1 for guest login or 3 for login using a password.
To mount volumes using IP addresses and other address formats, use the AFPXVolMountInfo structure.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hAFPXVolMountInfo
Defines a volume mounting structure for an AppleShare server, for AppleShare 3.7 and later.
struct AFPXVolMountInfo {
short length;
VolumeType media;
short flags;
SInt8 nbpInterval;
SInt8 nbpCount;
short uamType;
short zoneNameOffset;
short serverNameOffset;
short volNameOffset;
short userNameOffset;
short userPasswordOffset;
short volPasswordOffset;
short extendedFlags;
short uamNameOffset;
short alternateAddressOffset;
char AFPData[176];
};
typedef struct AFPXVolMountInfo AFPXVolMountInfo;
typedef AFPXVolMountInfo * AFPXVolMountInfoPtr;
Fields
lengthThe length of the
AFPXVolMountInfostructure (that is, the total length of the structure header described here plus the variable-length location data).mediaThe volume type of the remote volume. The value
AppleShareMediaType(a constant that translates to'afpm') represents an AppleShare volume.flagsVolume mount flags. See “Volume Mount Flags” for a description of the bits in this field. In order to use the new features of the extended AFP volume mount structure, you must set the
volMountExtendedFlagsBitbit.nbpIntervalThe NBP retransmit interval, in units of 8 ticks.
nbpCountThe NBP retransmit count. This field specifies the total number of times a packet should be transmitted, including the first transmission.
uamTypeThe user authentication method used by the remote volume. AppleShare uses four methods, defined by the constants described in “Authentication Method Constants.”
zoneNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the AppleShare zone.serverNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the AppleShare server.volNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the volume.userNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the name (as a pascal string) of the user.userPasswordOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the user’s password (as a pascal string).volPasswordOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the volume’s password (as a pascal string). Some versions of the AppleShare software do not pass the information in this field to the server.extendedFlagsExtended flags. See “Extended AFP Volume Mounting Information Flag.”
uamNameOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing the user authentication module name (as a pascal string).alternateAddressOffsetThe offset in bytes from the beginning of the structure to the entry in the
AFPDatafield containing IP addresses, specified as a block of tagged data. This block of tagged data begins with a version byte and a count byte, followed by up to 255 tagged addresses. SeeAFPAlternateAddress.AFPDataThe actual volume mounting information, offsets to which are contained in the preceding fields. To mount an AFP volume, you must fill in the structure with at least the zone name, server name, user name, user password, and volume password. You can lay out the data in any order within this data field, as long as you specify the correct offsets in the offset fields.
Discussion
To mount an AppleShare server, fill out an AFPXVolMountInfo structure using the PBGetVolMountInfo function and then pass this structure to the PBVolumeMount function to mount the volume.
The extended AFP volume mount information structure requires AppleShare client 3.7 and later. The new fields and flag bits allow you to specify the information needed to support TCP/IP and User Authentication Modules.
Note that, for all fields specifying an offset, if you wish to leave the string field in the AFPData field empty, you must specify an empty string and have the offset in the corresponding offset field point to that empty string. You cannot simply pass 0 as the offset.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hCatPositionRec
Defines a catalog position structure, which maintains the current position of a catalog search between calls to PBCatSearchSync or PBCatSearchAsync.
struct CatPositionRec {
long initialize;
short priv[6];
};
typedef struct CatPositionRec CatPositionRec;
Fields
initializeThe starting point of the catalog search. To start searching at the beginning of a catalog, specify 0 in this field. To resume a previous search, pass the value returned by the previous call to
PBCatSearchSyncorPBCatSearchAsync.privAn array of integers that is used internally by
PBCatSearchSyncandPBCatSearchAsync.
Discussion
When you call the PBCatSearchSync or PBCatSearchAsync function to search a volume’s catalog file, you can specify, in the ioCatPosition field of the parameter block passed to PBCatSearchSync and PBCatSearchAsync, a catalog position structure. If a catalog search consumes more time than is allowed by the ioSearchTime field, PBCatSearchSync and PBCatSearchAsync store a directory-location index in that structure; when you call PBCatSearchSync or PBCatSearchAsync again, it uses that structure to resume searching where it left off.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hCInfoPBRec
Defines a catalog information parameter block for file and directory information.
union CInfoPBRec {
HFileInfo hFileInfo;
DirInfo dirInfo;
};
typedef union CInfoPBRec CInfoPBRec;
typedef CInfoPBRec * CInfoPBPtr;
Fields
hFileInfodirInfo
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hCMovePBRec
Defines a parameter block, used with the functions PBCatMoveSync and PBCatMoveAsync.
struct CMovePBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler1;
StringPtr ioNewName;
long filler2;
long ioNewDirID;
long filler3[2];
long ioDirID;
};
typedef struct CMovePBRec CMovePBRec;
typedef CMovePBRec * CMovePBPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type (This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler1Reserved.
ioNewNameThe name of the directory into which the specified file or directory is to be moved.
filler2Reserved.
ioNewDirIDThe directory ID of the directory into which the specified file or directory is to be moved.
filler3Reserved.
ioDirIDThe current directory ID of the file or directory to be moved (used in conjunction with the
ioVRefNumandioNamePtrfields).
Discussion
The low-level HFS function PBCatMove uses the catalog move parameter block defined by the CMovePBRec data type.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hCntrlParam
Defines a parameter block used by control and status functions in the classic Device Manager.
struct CntrlParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioCRefNum;
short csCode;
short csParam[11];
};
typedef struct CntrlParam CntrlParam;
typedef CntrlParam * CntrlParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioCRefNumThe driver reference number for the I/O operation.
csCodeA value identifying the type of control or status request. Each driver may interpret this number differently.
csParamThe control or status information passed to or from the driver. This field is declared generically as an array of eleven integers. Each driver may interpret the contents of this field differently. Refer to the driver's documentation for specific information.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hConstFSSpecPtr
Defines a pointer to an FSSpec structure.
typedef const FSSpec* ConstFSSpecPtr;
Discussion
The only difference between “const FSSpec*” and the ConstFSSpecPtr data type is that, as a parameter, a ConstFSSpecPtr data type is allowed to be NULL. See FSSpec.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hConstHFSUniStr255Param
Defines a pointer to an HFSUniStr255 structure.
typedef const HFSUniStr255* ConstHFSUniStr255Param;
Discussion
See HFSUniStr255.
Availability
- Available in OS X v10.0 and later.
Declared In
hfs_format.hCopyParam
Defines a parameter block used by low-level HFS file copying functions.
struct CopyParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioDstVRefNum;
short filler8;
StringPtr ioNewName;
StringPtr ioCopyName;
long ioNewDirID;
long filler14;
long filler15;
long ioDirID;
};
typedef struct CopyParam CopyParam;
typedef CopyParam * CopyParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioDstVRefNumA volume reference number for the destination volume.
filler8Reserved.
ioNewNameA pointer to the destination pathname.
ioCopyNameA pointer to an optional name.
ioNewDirIDA destination directory ID.
filler14Reserved.
filler15Reserved.
ioDirIDA directory ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hCSParam
Defines a parameter block used by low-level HFS catalog search functions.
struct CSParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
FSSpecPtr ioMatchPtr;
long ioReqMatchCount;
long ioActMatchCount;
long ioSearchBits;
CInfoPBPtr ioSearchInfo1;
CInfoPBPtr ioSearchInfo2;
long ioSearchTime;
CatPositionRec ioCatPosition;
Ptr ioOptBuffer;
long ioOptBufSize;
};
typedef struct CSParam CSParam;
typedef CSParam * CSParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioMatchPtrA pointer to an array of
FSSpecstructures in which the file and directory names that match the selection criteria are returned. The array must be large enough to hold the largest possible number ofFSSpecstructures, as determined by theioReqMatchCountfield.ioReqMatchCountThe maximum number of matches to return. This number should be the number of
FSSpecstructures that will fit in the memory pointed to by theioMatchPtrfield. You can use this field to avoid a possible excess of matches for criteria that prove to be too general (or to limit the length of a search if theioSearchTimefield isn’t used).ioActMatchCountThe number of actual matches found.
ioSearchBitsThe fields of the parameter blocks in the
ioSearchInfo1andioSearchInfo2fields that are relevant to the search. See “Catalog Search Bits” for more information.ioSearchInfo1A pointer to a
CInfoPBRecparameter block that contains the search information. For values that match by mask and value (Finder information, for example), set the bits in the structure passed in theioSearchInfo2field, and set the matching values in this structure. For values that match against a range (such as dates), set the lower bounds for the range in this structure.ioSearchInfo2A pointer to a second
CInfoPBRecparameter block that contains the search information. For values that match by mask and value (Finder information, for example), set the bits in this structure, and set the matching values in the structure passed in theioSearchInfo1field. For values that match against a range (such as dates), set the upper bounds for the range in this structure.ioSearchTimeA time limit on a search, in Time Manager format. Use this field to limit the run time of a single call to
PBCatSearchSyncorPBCatSearchAsync. A value of 0 imposes no time limit. If the value of this field is positive, it is interpreted as milliseconds. If the value of this field is negative, it is interpreted as negated microseconds.ioCatPositionA position in the catalog where searching should begin. Use this field to keep an index into the catalog when breaking down the
PBCatSearchSyncorPBCatSearchAsyncsearch into a number of smaller searches. This field is valid wheneverPBCatSearchSyncorPBCatSearchAsyncexits because it either spends the maximum time allowed byioSearchTimeor finds the maximum number of matches allowed byioReqMatchCount.To start at the beginning of the catalog, set the
initializefield ofioCatPositionto 0. Before exiting after an interrupted search,PBCatSearchSyncorPBCatSearchAsyncsets that field to the next catalog entry to be searched.To resume where the previous call stopped, pass the entire
CatPositionRecstructure returned by the previous call as input to the next.ioOptBufferA pointer to an optional read buffer. The
ioOptBufferandioOptBufSizefields let you specify a part of memory as a read buffer, increasing search speed.ioOptBufSizeThe size of the buffer pointed to by
ioOptBuffer. Buffer size effectiveness varies with models and configurations, but a 16 KB buffer is likely to be optimal. The size should be at least 1024 bytes and should be an integral multiple of 512 bytes.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hDirInfo
Defines a structure which holds catalog information about a directory.
struct DirInfo {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioFRefNum;
SInt8 ioFVersNum;
SInt8 filler1;
short ioFDirIndex;
SInt8 ioFlAttrib;
SInt8 ioACUser;
DInfo ioDrUsrWds;
long ioDrDirID;
unsigned short ioDrNmFls;
short filler3[9];
unsigned long ioDrCrDat;
unsigned long ioDrMdDat;
unsigned long ioDrBkDat;
DXInfo ioDrFndrInfo;
long ioDrParID;
};
typedef struct DirInfo DirInfo;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioFRefNumThe file reference number of an open file.
ioFVersNumA file version number. This field is no longer used. File version numbers are an artifact of the obsolete MFS, and are not supported on HFS volumes. You should always set this field to 0.
filler1Reserved.
ioFDirIndexA file and directory index. If this field contains a positive number,
PBGetCatInfoSyncandPBGetCatInfoAsyncreturn information about the file or directory having that directory index in the directory specified by theioVRefNumfield. (IfioVRefNumcontains a volume reference number, the specified directory is that volume’s root directory.)If this field contains 0,
PBGetCatInfoSyncandPBGetCatInfoAsyncreturn information about the file or directory whose name is specified in theioNamePtrfield and that is located in the directory specified by theioVRefNumfield. (Once again, ifioVRefNumcontains a volume reference number, the specified directory is that volume’s root directory.)If this field contains a negative number,
PBGetCatInfoSyncandPBGetCatInfoAsyncignore theioNamePtrfield and returns information about the directory specified in theioDirIDfield. If bothioDirIDandioVRefNumare set to 0,PBGetCatInfoSyncandPBGetCatInfoAsyncreturn information about the current default directory.ioFlAttribFile or directory attributes. See “File Attribute Constants” for the meaning of the bits in this field.
ioACUserThe user’s access rights for the specified directory. See “User Privileges Constants” for the meaning of the bits in this field.
ioDrUsrWdsInformation used by the Finder.
ioDrDirIDA directory ID. On input to
PBGetCatInfoSyncandPBGetCatInfoAsync, this field contains a directory ID, which is used only if the value of theioFDirIndexfield is negative. On output, this field contains the directory ID of the specified directory.ioDrNmFlsThe number of files in the directory.
filler3Reserved.
ioDrCrDatThe date and time of the directory’s creation, in seconds since midnight, January 1, 1904. However, on OS X, if you set the creation date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970, and that is the value which will be returned if you later try to retrieve the creation date.
Note that file systems other than AFP, HFS and HFS Plus do not generally support creation dates.
ioDrMdDatThe date and time of the last modification to the directory, in seconds since midnight, January 1, 1904. However, on OS X, if you set the modification date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970.
ioDrBkDatThe date and time that the directory was last backed up, in seconds since midnight, January 1, 1904. However, on OS X, if you set the backup date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970.
Note that file systems other than AFP, HFS and HFS Plus do not generally support backup dates.
ioDrFndrInfoAdditional information used by the Finder.
ioDrParIDThe directory ID of the specified directory’s parent directory.
refCon
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hDrvQEl
Defines a drive queue element.
struct DrvQEl {
QElemPtr qLink;
short qType;
short dQDrive;
short dQRefNum;
short dQFSID;
unsigned short dQDrvSz;
unsigned short dQDrvSz2;
};
typedef struct DrvQEl DrvQEl;
typedef DrvQEl * DrvQElPtr;
Fields
qLinkA pointer to the next entry in the drive queue.
qTypeUsed to specify the size of the drive. If the value of this field is 0, the number of logical blocks on the drive is contained in the
dQDrvSzfield alone. If the value of this field is 1, both thedQDrvSzfield and thedQDrvSz2field are used to store the number of blocks; in that case, thedQDrvSz2field contains the high-order word of this number anddQDrvSzcontains the low-order word.dQDriveThe drive number of the drive.
dQRefNumThe driver reference number of the driver controlling the device on which the volume is mounted.
dQFSIDAn identifier for the file system handling the volume in the drive it’s zero for volumes handled by the File Manager and nonzero for volumes handled by other file systems.
dQDrvSzThe number of logical blocks on the drive.
dQDrvSz2An additional field to handle large drives. This field is only used if the
qTypefield is 1.
Discussion
The File Manager maintains a list of all disk drives connected to the computer. It maintains this list in the drive queue, which is a standard operating system queue. The drive queue is initially created at system startup time. Elements are added to the queue at system startup time or when you call the AddDrive function. The drive queue can support any number of drives, limited only by memory space. Each element in the drive queue contains information about the corresponding drive.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hDTPBRec
Defines the desktop database parameter block used by the desktop database functions.
struct DTPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioDTRefNum;
short ioIndex;
long ioTagInfo;
Ptr ioDTBuffer;
long ioDTReqCount;
long ioDTActCount;
SInt8 ioFiller1;
UInt8 ioIconType;
short ioFiller2;
long ioDirID;
OSType ioFileCreator;
OSType ioFileType;
long ioFiller3;
long ioDTLgLen;
long ioDTPyLen;
short ioFiller4[14];
long ioAPPLParID;
};
typedef struct DTPBRec DTPBRec;
typedef DTPBRec * DTPBPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a file, directory, or volume name. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumThe volume reference number.
ioDTRefNumThe desktop database reference number.
ioIndexThe index into icon list.
ioTagInfoThe tag information.
ioDTBufferThe data buffer.
ioDTReqCountThe requested length of data.
ioDTActCountThe actual length of data.
ioFiller1Unused.
ioIconTypeThe icon type.
ioFiller2Unused.
ioDirIDThe parent directory ID.
ioFileCreatorThe file creator.
ioFileTypeThe file type.
ioFiller3Unused.
ioDTLgLenThe logical length of the desktop database.
ioDTPyLenThe physical length of the desktop database.
ioFiller4Unused.
ioAPPLParIDThe parent directory ID of an application.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hFCBPBRec
Defines a file control block (FCB) parameter block used by the functions PBGetFCBInfoSync and PBGetFCBInfoAsync.
struct FCBPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioRefNum;
short filler;
short ioFCBIndx;
short filler1;
long ioFCBFlNm;
short ioFCBFlags;
unsigned short ioFCBStBlk;
long ioFCBEOF;
long ioFCBPLen;
long ioFCBCrPs;
short ioFCBVRefNum;
long ioFCBClpSiz;
long ioFCBParID;
};
typedef struct FCBPBRec FCBPBRec;
typedef FCBPBRec * FCBPBPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioRefNumThe file reference number of an open file.
fillerReserved.
ioFCBIndxAn index for use with the
PBGetFCBInfoSyncandPBGetFCBInfoAsyncfunctions.filler1Reserved.
ioFCBFlNmThe file ID.
ioFCBFlagsFlags describing the status of the file. See “FCB Flags” for the meanings of the bits in this field.
ioFCBStBlkThe number of the first allocation block of the file.
ioFCBEOFThe logical length (logical end-of-file) of the file.
ioFCBPLenThe physical length (physical end-of-file) of the file.
ioFCBCrPsThe current position of the file mark.
ioFCBVRefNumThe volume reference number.
ioFCBClpSizThe file clump size.
ioFCBParIDThe file’s parent directory ID.
Discussion
The low-level HFS function PBGetFCBInfo uses the file control block parameter block defined by the FCBPBRec data type.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hFIDParam
Defines a parameter block used by low-level HFS file ID functions.
struct FIDParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler14;
StringPtr ioDestNamePtr;
long filler15;
long ioDestDirID;
long filler16;
long filler17;
long ioSrcDirID;
short filler18;
long ioFileID;
};
typedef struct FIDParam FIDParam;
typedef FIDParam * FIDParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler14Reserved.
ioDestNamePtrA pointer to the name of the destination file.
filler15Reserved.
ioDestDirIDThe parent directory ID of the destination file.
filler16Reserved.
filler17Reserved.
ioSrcDirIDThe parent directory ID of the source file.
filler18Reserved.
ioFileIDThe file ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hFileParam
Defines a parameter block used by low-level functions for getting and setting file information.
struct FileParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioFRefNum;
SInt8 ioFVersNum;
SInt8 filler1;
short ioFDirIndex;
SInt8 ioFlAttrib;
SInt8 ioFlVersNum;
FInfo ioFlFndrInfo;
unsigned long ioFlNum;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
};
typedef struct FileParam FileParam;
typedef FileParam * FileParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioFRefNumThe file reference number of an open file.
ioFVersNumA file version number. This field is no longer used. File version numbers are an artifact of the obsolete MFS, and are not supported on HFS volumes. You should always set this field to 0.
filler1Reserved.
ioFDirIndexA directory index for use with the
PBHGetFInfoSyncandPBHGetFInfoAsyncfunctions.ioFlAttribFile attributes. See “File Attribute Constants” for the meaning of the bits in this field.
ioFlVersNumA file version number. This feature is no longer supported, and you must always set this field to 0.
ioFlFndrInfoInformation used by the Finder.
ioFlNumA file ID.
ioFlStBlkThe first allocation block of the data fork. This field contains 0 if the file’s data fork is empty.
ioFlLgLenThe logical length (logical end-of-file) of the data fork.
ioFlPyLenThe physical length (physical end-of-file) of the data fork.
ioFlRStBlkThe first allocation block of the resource fork. This field contains 0 if the file’s resource fork is empty.
ioFlRLgLenThe logical length (logical end-of-file) of the resource fork.
ioFlRPyLenThe physical length (physical end-of-file) of the resource fork.
ioFlCrDatThe date and time of the file’s creation, specified in seconds since midnight, January 1, 1904.
ioFlMdDatThe date and time of the last modification to the file, specified in seconds since midnight, January 1, 1904.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hFNSubscriptionRef
typedef struct OpaqueFNSubscriptionRef * FNSubscriptionRef;
Availability
- Available in OS X v10.1 and later.
Declared In
Files.hFNSubscriptionUPP
typedef FNSubscriptionProcPtr FNSubscriptionUPP;
Availability
- Available in OS X v10.1 and later.
Declared In
Files.hForeignPrivParam
Defines a parameter block used by low-level HFS foreign privileges functions.
struct ForeignPrivParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long ioFiller21;
long ioFiller22;
Ptr ioForeignPrivBuffer;
long ioForeignPrivActCount;
long ioForeignPrivReqCount;
long ioFiller23;
long ioForeignPrivDirID;
long ioForeignPrivInfo1;
long ioForeignPrivInfo2;
long ioForeignPrivInfo3;
long ioForeignPrivInfo4;
};
typedef struct ForeignPrivParam ForeignPrivParam;
typedef ForeignPrivParam * ForeignPrivParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioFiller21Reserved.
ioFiller22Reserved.
ioForeignPrivBufferA pointer to a buffer containing access-control information about the foreign file system.
ioForeignPrivActCountThe size of the buffer pointed to by the
ioForeignPrivBufferfield.ioForeignPrivReqCountThe amount of the buffer pointed to by the
ioForeignPrivBufferfield that was actually used to hold data.ioFiller23Reserved.
ioForeignPrivDirIDThe parent directory ID of the foreign file or directory.
ioForeignPrivInfo1A long word that may contain privileges data.
ioForeignPrivInfo2A long word that may contain privileges data.
ioForeignPrivInfo3A long word that may contain privileges data.
ioForeignPrivInfo4A long word that may contain privileges data.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hFSCatalogBulkParam
Defines a parameter block used to retrieve catalog information in bulk on HFS Plus volumes.
struct FSCatalogBulkParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
Boolean containerChanged;
UInt8 reserved;
FSIteratorFlags iteratorFlags;
FSIterator iterator;
const FSRef * container;
ItemCount maximumItems;
ItemCount actualItems;
FSCatalogInfoBitmap whichInfo;
FSCatalogInfo * catalogInfo;
FSRef * refs;
FSSpec * specs;
HFSUniStr255 * names;
const FSSearchParams * searchParams;
};
typedef struct FSCatalogBulkParam FSCatalogBulkParam;
typedef FSCatalogBulkParam * FSCatalogBulkParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
containerChangedA Boolean value indicating whether or not the container has changed since the last call to
PBGetCatalogInfoBulkSyncorPBGetCatalogInfoBulkAsync.reservedReserved.
iteratorFlagsA set of flags which specifies how the iterator should iterate over the container. See “Iterator Flags” for the meaning of the constants used here.
iteratorA catalog iterator.
containerAn
FSReffor the directory or volume to iterate over.maximumItemsThe maximum number of items to return information about.
actualItemsThe actual number of items returned.
whichInfoA bitmap indicating which fields of the catalog information structure to return. See “Catalog Information Bitmap Constants” for the bits defined for this field.
catalogInfoA pointer to an array of catalog information structures. On input, you should pass a pointer to an array of
maximumItemsFSCatalogInfostructures. On return,actualItemsstructures will be filled out with the information requested in thewhichInfofield. If you do not wish any catalog information to be returned, pass aNULLpointer in this field and pass the constantkFSCatInfoNonein thewhichInfofield.refsA pointer to an array of
FSRefstructures. On input, you should pass a pointer tomaximumItemsFSRefstructures. On return,actualItemsstructures will be filled out. If you do not wish anyFSRefstructures to be returned, pass aNULLpointer in this field.specsA pointer to an array of
FSSpecstructures. On input, you should pass a pointer tomaximumItemsfile system specifications. On return,actualItemsFSSpecstructures will be filled in. If you do not wish anyFSSpecinformation to be returned, pass aNULLpointer in this field.namesA pointer to an array of Unicode names. On input, you should pass a pointer to an array of
maximumItemsHFSUniStr255structures. On return,actualItemsstructures will contain Unicode names. If you do not wish any file or directory names to be returned, pass aNULLpointer in this field.searchParamsA pointer to an
FSSearchParamsstructure, specifying the values to match against.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSCatalogInfo
Holds basic information about a file or directory.
struct FSCatalogInfo {
UInt16 nodeFlags;
FSVolumeRefNum volume;
UInt32 parentDirID;
UInt32 nodeID;
UInt8 sharingFlags;
UInt8 userPrivileges;
UInt8 reserved1;
UInt8 reserved2;
UTCDateTime createDate;
UTCDateTime contentModDate;
UTCDateTime attributeModDate;
UTCDateTime accessDate;
UTCDateTime backupDate;
UInt32 permissions[4];
UInt8 finderInfo[16];
UInt8 extFinderInfo[16];
UInt64 dataLogicalSize;
UInt64 dataPhysicalSize;
UInt64 rsrcLogicalSize;
UInt64 rsrcPhysicalSize;
UInt32 valence;
TextEncoding textEncodingHint;
};
typedef struct FSCatalogInfo FSCatalogInfo;
typedef FSCatalogInfo * FSCatalogInfoPtr;
Fields
nodeFlagsNode flags. This field has two defined bits that indicate whether an object is a file or folder, and whether a file is locked (constants
kFSNodeIsDirectoryMaskandkFSNodeLockedMask). See “Catalog Information Node Flags” for the values you can use here.volumeThe object's volume reference.
parentDirIDThe ID of the directory that contains the given object. The root directory of a volume always has ID
fsRtDirID(2); the parent of the root directory is IDfsRtParID(1). Note that there is no object with IDfsRtParID; this is merely used when the File Manager is asked for the parent of the root directory.nodeIDThe file or directory ID.
sharingFlagsThe object’s sharing flags. See “Catalog Information Sharing Flags ” for the meaning of the bits defined for this field.
userPrivilegesThe user's effective AFP privileges (same as
ioACUserin the oldHFileInfoandDirInfostructures). See “User Privileges Constants.”reserved1Reserved.
reserved2Reserved.
createDateThe date and time of the creation of the object. Note that file systems other than AFP, HFS and HFS Plus do not generally support creation dates. For file systems which do not support creation dates,
FSGetCatalogInfo,PBGetCatalogInfoSync, andPBGetCatalogInfoAsyncreturn 0 in this field.contentModDateThe date and time that the data or resource fork was last modified.
attributeModDateThe date and time that an attribute of the object (such as a fork other than the data or resource fork) was last modified.
accessDateThe date and time that the object was last accessed. The Mac OS 9 File Manager does not automatically update the
accessDatefield; it exists primarily for use by other operating systems (notably OS X).backupDateThe date and time of the object’s last backup. This field is not updated by the File Manager a backup utility may use this field if it wishes. Note that file systems other than AFP, HFS and HFS Plus do not generally support backup dates. For file systems which do not support backup dates,
FSGetCatalogInfo,PBGetCatalogInfoSync, andPBGetCatalogInfoAsyncreturn 0 in this field.permissionsUser and group permission information. The Mac OS 8 and 9 File Manager does not use or enforce this permission information. It could be used by a file server program or other operating system (primarily OS X). In OS X, this array contains the file system permissions of the returned item. To use this information, coerce the parameter to a
FSPermissionInfostructure.finderInfoBasic Finder information for the object. This information is available in the catalog information, instead of in a named fork, for historical reasons. The File Manager does not interpret the contents of these fields. To use this information, coerce the parameter to a
FileInfoorFolderInfostructure.extFinderInfoExtended Finder information for the object. This information is available in the catalog information, instead of in a named fork, for historical reasons. The File Manager does not interpret the contents of these fields. To use this information, coerce the parameter to an
ExtendedFileInfoorExtendedFolderInfostructure.dataLogicalSizeThe size of the data fork in bytes (the fork’s logical size). The information in this field is only valid for files do not rely upon the value returned in this field for folders.
dataPhysicalSizeThe amount of disk space, in bytes, occupied by the data fork (the fork’s physical size). The information in this field is only valid for files do not rely upon the value returned in this field for folders.
rsrcLogicalSizeThe size of the resource fork (the fork’s logical size). The information in this field is only valid for files do not rely upon the value returned in this field for folders.
rsrcPhysicalSizeThe amount of disk space occupied by the resource fork (the fork’s physical size). The information in this field is only valid for files do not rely upon the value returned in this field for folders.
valenceFor folders only, the number of items (files plus directories) contained within the directory. For files, it is set to zero. Many volume formats do not store a field containing a directory’s valence. For those volume formats, this field is very expensive to compute. Think carefully before you ask the File Manager to return this field.
textEncodingHintThe
textEncodingHintfield is used in conjunction with the Unicode filename of the object. It is an optional hint that can be used by the volume format when converting the Unicode to some other encoding. For example, HFS Plus stores this value and uses it when converting the name to a Mac OS encoding, such as when the name is returned byPBGetCatInfoSyncorPBGetCatInfoAsync. As another example, HFS volumes use this value to convert the Unicode name to a Mac OS encoded name stored on disk. If the entire Unicode name can be converted to a single Mac OS encoding, then that encoding should be used as thetextEncodingHint; otherwise, a text encoding corresponding to the first characters of the name will probably provide the best user experience.If a
textEncodingHintis not supplied when a file or directory is created or renamed, the volume format will use a default value. This default value may not be the best possible choice for the given filename. Whenever possible, a client should supply atextEncodingHint.
Discussion
The FSCatalogInfoBitmap type is used to indicate which fields of the FSCatalogInfo should be set or retrieved. If the bit corresponding to a particular field is not set, then that field is not changed if the FSCatalogInfo is an output parameter, and that field is ignored if the FSCatalogInfo is an input parameter.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSCatalogInfoBitmap
Describes which fields of the FSCatalogInfo structure you wish to retrieve or set.
typedef UInt32 FSCatalogInfoBitmap;
Discussion
If the bit corresponding to a particular field is not set in the bitmap, then that field is not changed in the FSCatalogInfo structure if it is an output parameter, and that field is ignored if the FSCatalogInfo structure is an input parameter. See “Catalog Information Bitmap Constants” for a description of the constants you should use with this data type.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSEjectStatus
typedef UInt32 FSEjectStatus;
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSFileOperationClientContext
Specifies user-defined data and callbacks associated with an asynchronous file operation.
struct FSFileOperationClientContext {
CFIndex version;
void *info;
CFAllocatorRetainCallBack retain;
CFAllocatorReleaseCallBack release;
CFAllocatorCopyDescriptionCallBack copyDescription;
};
typedef struct FSFileOperationClientContext FSFileOperationClientContext;
Fields
versionThe version number of the structure; this field should always contain 0.
infoA generic pointer to your user-defined data. This pointer is passed back to your application when you check the status of the file operation. There are two ways you can ask the File Manager for status information about a file operation: by supplying a status callback function when you start the operation, or by calling a file operation status function directly.
retainAn optional callback function that the File Manager can use to retain the user-defined data specified in the
infoparameter. If your data is a Core Foundation object, you can simply specify the functionCFRetain. If no callback is needed, set this field toNULL.releaseAn optional callback function that the File Manager can use to release the user-defined data specified in the
infoparameter. If your data is a Core Foundation object, you can simply specify the functionCFRelease. If no callback is needed, set this field toNULL.copyDescriptionAn optional callback function that the File Manager can use to create a descriptive string representation of your user-defined data for debugging purposes. If no callback is needed, set this field to
NULL.
Discussion
You supply a client context when calling functions such as FSCopyObjectAsync or FSMoveObjectAsync that start an asynchronous copy or move operation.
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSFileOperationRef
Defines an opaque type that represents an asynchronous file operation.
typedef struct __FSFileOperation * FSFileOperationRef;
Discussion
You supply a file operation object when calling functions such as FSCopyObjectAsync or FSMoveObjectAsync to start an asynchronous copy or move operation. You can also use a file operation object to check the status of a file operation or to cancel the operation.
To perform an asynchronous file operation:
Create a file operation object using the function
FSFileOperationCreate.Pass the object to the function
FSFileOperationScheduleWithRunLoopto schedule the operation.Pass the object to one of the asynchronous file operation functions to start the operation.
The FSFileOperationRef opaque type is a standard Core Foundation data type. It is derived from CFType and inherits the properties that all Core Foundation types have in common. For more information, see CFType Reference.
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSForkCBInfoParam
Defines a parameter block used by low-level HFS Plus fork control block functions.
struct FSForkCBInfoParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
SInt16 desiredRefNum;
SInt16 volumeRefNum;
SInt16 iterator;
SInt16 actualRefNum;
FSRef * ref;
FSForkInfo * forkInfo;
HFSUniStr255 * forkName;
};
typedef struct FSForkCBInfoParam FSForkCBInfoParam;
typedef FSForkCBInfoParam * FSForkCBInfoParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
desiredRefNumA fork reference number.
volumeRefNumThe volume reference number of the volume to match, or zero to match all volumes.
iteratorAn iterator. Set to zero to start iteration.
actualRefNumOn return, the actual fork reference number found.
refA pointer to an
FSReffor the specified fork.forkInfoA pointer to a fork information structure,
FSForkInfo.forkNameA pointer to the fork’s Unicode name.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSForkInfo
Contains information about an open fork.
struct FSForkInfo {
SInt8 flags;
SInt8 permissions;
FSVolumeRefNum volume;
UInt32 reserved2;
UInt32 nodeID;
UInt32 forkID;
UInt64 currentPosition;
UInt64 logicalEOF;
UInt64 physicalEOF;
UInt64 process;
};
typedef struct FSForkInfo FSForkInfo;
typedef FSForkInfo * FSForkInfoPtr;
Fields
flagsFlags describing the status of the fork. See “FCB Flags” for a description of the bits in this field.
permissionsUser and group permission information.
volumeA volume specification. This can be a volume reference number, drive number, or 0 for the default volume.
reserved2Reserved.
nodeIDThe file or directory ID of the file or directory with which the fork is associated.
forkIDThe fork ID.
currentPositionThe current position within the fork.
logicalEOFThe logical size of the fork.
physicalEOFThe physical size of the fork.
processThe process which opened the fork.
Discussion
This data type is used in the forkInfo parameter of the FSGetForkCBInfo function, and in the forkInfo field of the FSForkCBInfoParam parameter block passed to the PBGetForkCBInfoSync and PBGetForkCBInfoAsync functions. When these functions return, the FSForkInfo structure contains information about the specified open fork.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSForkIOParam
Defines a parameter block used by low-level HFS Plus fork I/O functions.
struct FSForkIOParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
void * reserved1;
SInt16 reserved2;
SInt16 forkRefNum;
UInt8 reserved3;
SInt8 permissions;
const FSRef * ref;
Ptr buffer;
UInt32 requestCount;
UInt32 actualCount;
UInt16 positionMode;
SInt64 positionOffset;
FSAllocationFlags allocationFlags;
UInt64 allocationAmount;
UniCharCount forkNameLength;
const UniChar * forkName;
CatPositionRec forkIterator;
HFSUniStr255 * outForkName;
};
typedef struct FSForkIOParam FSForkIOParam;
typedef FSForkIOParam * FSForkIOParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
reserved1Reserved.
reserved2Reserved.
forkRefNumA reference number for a fork.
reserved3Reserved.
permissionsThe desired type of access to the specified fork. See “File Access Permission Constants” for a description of the types of access that you can request.
refAn
FSReffor the file or directory to open.bufferA pointer to a data buffer.
requestCountThe number of bytes requested for the given operation.
actualCountThe actual number of bytes completed by the call.
positionModeA constant indicating the base location within the file for the start of the operation. See “Position Mode Constants” for the meaning of the constants you can use in this field.
positionOffsetThe offset from the base location specified in the
positionModeoffset for the start of the operation.allocationFlagsA set of bit flags used by the
FSAllocateForkfunction to control how space is allocated. See “Allocation Flags” for a description of the defined flags.allocationAmountFor the
FSAllocateForkfunction, the amount of space, in bytes, to allocate.forkNameLengthThe length of the file or directory name passed in the
forkNamefield, in Unicode characters.forkNameA pointer to the file or directory’s Unicode name. This field is an input parameter functions which return the file or directory name in the parameter block use the
outForkNamefield.forkIteratorA fork iterator.
outForkNameA pointer to the file or directory’s Unicode name this is an output parameter. For functions which require the file or directory name as an input argument, you should pass a pointer to that name in the
forkNamefield and pass the length of the name in theforkNameLengthfield.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSIterator
Refers to a position within the catalog, used when iterating over files and folders in a directory.
typedef struct OpaqueFSIterator * FSIterator;
Discussion
This data type is like a file reference number because it maintains state internally to the File Manager and must be explicitly opened and closed.
An FSIterator is returned by FSOpenIterator and is passed as input to FSGetCatalogInfoBulk , FSCatalogSearch and FSCloseIterator.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSMountStatus
typedef UInt32 FSMountStatus;
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSPermissionInfo
struct FSPermissionInfo {
UInt32 userID;
UInt32 groupID;
UInt8 reserved1;
UInt8 userAccess;
UInt16 mode;
UInt32 reserved2;
};
typedef struct FSPermissionInfo FSPermissionInfo;
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSRangeLockParam
Defines a parameter block for use with 64-bit range locking functions.
struct FSRangeLockParam {
QElemPtr qLink;
SInt16 qType;
SInt16 ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
FSIORefNum forkRefNum;
UInt64 requestCount;
UInt16 positionMode;
SInt64 positionOffset;
UInt64 rangeStart;
};
typedef struct FSRangeLockParam FSRangeLockParam;
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSRangeLockParamPtr
Defines a pointer to a range lock parameter block.
typedef FSRangeLockParam *FSRangeLockParamPtr;
Availability
- Available in OS X v10.4 and later.
Declared In
Files.hFSRef
Identifies a directory or file, including a volume’s root directory.
struct FSRef {
UInt8 hidden[80];
};
typedef struct FSRef FSRef;
typedef FSRef * FSRefPtr;
Discussion
This data type’s purpose is similar to an FSSpec except that an FSRef is completely opaque. An FSRef contains whatever information is needed to find the given object; the internal structure of an FSRef is likely to vary based on the volume format, and may vary based on the particular object being identified.
The client of the File Manager cannot examine the contents of an FSRef to extract information about the parent directory or the object’s name. Similarly, an FSRef cannot be constructed directly by the client; the FSRef must be constructed and returned via the File Manager. There is no need to call the File Manager to dispose an FSRef.
To determine the volume, parent directory and name associated with an FSRef, or to get an equivalent FSSpec, use the FSGetCatalogInfo call.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSRefParam
Defines a parameter block used by low-level HFS Plus functions.
struct FSRefParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
ConstStringPtr ioNamePtr;
short ioVRefNum;
SInt16 reserved1;
UInt8 reserved2;
UInt8 reserved3;
const FSRef * ref;
FSCatalogInfoBitmap whichInfo;
FSCatalogInfo * catInfo;
UniCharCount nameLength;
const UniChar * name;
long ioDirID;
FSSpec * spec;
FSRef * parentRef;
FSRef * newRef;
TextEncoding textEncodingHint;
HFSUniStr255 * outName;
};
typedef struct FSRefParam FSRefParam;
typedef FSRefParam * FSRefParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—you should set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, or 0 for the default volume.
reserved1Reserved.
reserved2Reserved.
reserved3Reserved.
refThe
FSRefdescribing the file or directory which is the target of the call.whichInfoAn
FSCatalogInfoBitmapwhich describes the fields of the catalog information structure passed in thecatInfofield which are to be retrieved or set.catInfoA catalog information structure containing information about the specified file or directory.
nameLengthThe length of the file or directory’s name, for the
PBCreateSync,PBCreateAsync,PBRenameSync, andPBRenameAsyncfunctions.nameA pointer to the file or directory’s Unicode name, for the
PBCreateSync,PBCreateAsync,PBRenameSync, andPBRenameAsyncfunctions.ioDirIDThe directory ID of the specified file or directory’s parent directory.
specThe target or source
FSRef.parentRefThe secondary or destination
FSRef. (Or the ref of the directory to move another file or directory to).newRefThe output
FSRef(ie, a newFSRef).textEncodingHintA text encoding hint for the file or directory’s Unicode name, used by the
PBMakeFSRefSync,PBMakeFSRefAsync,PBRenameSync, andPBRenameAsyncfunctions.outNameOn output, a pointer to the Unicode name of the file or directory, used by the
PBGetCatalogInfoSyncandPBGetCatalogInfoAsyncfunctions.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSSearchParams
Describes the search criteria for a catalog information search.
struct FSSearchParams {
Duration searchTime;
OptionBits searchBits;
UniCharCount searchNameLength;
const UniChar * searchName;
FSCatalogInfo * searchInfo1;
FSCatalogInfo * searchInfo2;
};
typedef struct FSSearchParams FSSearchParams;
typedef FSSearchParams * FSSearchParamsPtr;
Fields
searchTimeA Time Manager duration for the duration of the search. If you specify a non-zero value in this field, the search may terminate after the specified time, even if the maximum number of requested objects has not been returned and the entire catalog has not been scanned.
If this value is negative, the time is interpreted in microseconds; if positive, it is interpreted as milliseconds. If
searchTimeis zero, there is no time limit on the search.searchBitsA set of bits specifying which catalog information fields to search on. See “Catalog Search Constants” for the constants which you can use here.
searchNameLengthThe length of the Unicode name to search by.
searchNameA pointer to the Unicode name to search by.
searchInfo1An
FSCatalogInfostructure which specifies the values and lower bounds of a search.searchInfo2A
FSCatalogInfostructure which specifies the masks and upper bounds of a search.
Discussion
Used by FSCatalogSearch , PBCatalogSearchSync , and PBCatalogSearchAsync to specify the criteria for a catalog search.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSSpec
Specifies the name and location of a file or directory.
struct FSSpec {
short vRefNum;
long parID;
StrFileName name;
};
typedef struct FSSpec FSSpec;
typedef FSSpec * FSSpecPtr;
Fields
vRefNumThe volume reference number of the volume containing the specified file or directory.
parIDThe parent directory ID of the specified file or directory (the directory ID of the directory containing the given file or directory).
nameThe name of the specified file or directory. In Carbon, this name must be a leaf name; the name cannot contain a semicolon.
Discussion
The FSSpec structure can describe only a file or a directory, not a volume. A volume can be identified by its root directory, although the system software never uses an FSSpec structure to describe a volume. The directory ID of the root’s parent directory is fsRtParID. The name of the root directory is the same as the name of the volume.
If you need to convert a file specification into an FSSpec structure, call the function FSMakeFSSpec . Do not fill in the fields of an FSSpec structure yourself.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSSpecArrayPtr
Defines a pointer to an array of FSSpec structures.
typedef FSSpecPtr FSSpecArrayPtr;
Discussion
See FSSpec.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSUnmountStatus
typedef UInt32 FSUnmountStatus;
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeEjectUPP
typedef FSVolumeEjectProcPtr FSVolumeEjectUPP;
Discussion
For more information, see the description of the FSVolumeEjectProcPtr callback function.
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeInfo
Used when getting or setting information about a volume.
struct FSVolumeInfo {
UTCDateTime createDate;
UTCDateTime modifyDate;
UTCDateTime backupDate;
UTCDateTime checkedDate;
UInt32 fileCount;
UInt32 folderCount;
UInt64 totalBytes;
UInt64 freeBytes;
UInt32 blockSize;
UInt32 totalBlocks;
UInt32 freeBlocks;
UInt32 nextAllocation;
UInt32 rsrcClumpSize;
UInt32 dataClumpSize;
UInt32 nextCatalogID;
UInt8 finderInfo[32];
UInt16 flags;
UInt16 filesystemID;
UInt16 signature;
UInt16 driveNumber;
short driverRefNum;
};
typedef struct FSVolumeInfo FSVolumeInfo;
typedef FSVolumeInfo * FSVolumeInfoPtr;
Fields
createDateThe date and time the volume was created. A value of 0 means that the volume creation date is unknown.
modifyDateThe last time when the volume was modified in any way. A value of 0 means “never” or “unknown.
backupDateIndicates when the volume was last backed up. This field is for use by backup utilities. A value of 0 means “never” or “unknown.
checkedDateThe last date and time that the volume was checked for consistency. A value of 0 means “never” or “unknown.
fileCountThe total number of files on the volume, or 0 if unknown.
folderCountThe total number of folders on the volume, or 0 if unknown. Note that no root directory counts.
totalBytesThe size of the volume in bytes.
freeBytesThe number of bytes of free space on the volume.
blockSizeThe size of an allocation block, in bytes. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and may set this field to zero.
totalBlocksThe total number of allocation blocks on the volume. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and may set this field to zero.
freeBlocksThe number of unused allocation blocks on the volume. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and may set this field to zero.
nextAllocationA hint for where to start searching for free space during an allocation. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and may set this field to zero.
rsrcClumpSizeDefault resource fork clump size. When a fork is automatically grown as it is written, the File Manager attempts to allocate space that is a multiple of the clump size. This field is zero for volume formats that don’t support the notion of a clump size.
dataClumpSizeDefault data fork clump size. When a fork is automatically grown as it is written, the File Manager attempts to allocate space that is a multiple of the clump size. This field is zero for volume formats that don’t support the notion of a clump size.
nextCatalogIDThe next unused catalog node ID. Some volume formats (such as HFS and HFS Plus) use a monotonically increasing number for the catalog node ID (i.e. File ID or Directory ID) of newly created files and directories. For those volume formats, the
nextCatalogIDis the next file/directory ID that will be assigned. For other volume formats, this field will be zero.finderInfoInformation used by Finder, such as the Directory ID of the System Folder. Some volume formats do not support Finder information for a volume and will set this field to all zeroes.
flagsThis field contains bit flags holding information about the volume. See “Volume Information Flags” for the attribute constants you can use here.
filesystemIDIdentifies the filesystem implementation that is handling the volume; this is zero for HFS and HFS Plus volumes.
signatureThis field is used to distinguish between volume formats supported by a single filesystem implementation.
driveNumberThe drive number for the drive (drive queue element) associated with the volume. OS X does not support drive numbers; in OS X, the File Manager always returns a value of 1 in this field.
driverRefNumThe driver reference number for the drive (drive queue element) associated with the volume.
Discussion
This structure contains information about a volume as a whole information about a volume’s root directory would use the FSCatalogInfo structure.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSVolumeInfoBitmap
Describes which fields of the FSVolumeInfo structure you wish to retrieve or set.
typedef UInt32 FSVolumeInfoBitmap;
Discussion
If the bit corresponding to a particular field is not set in the bitmap, then that field is not changed in the FSVolumeInfo structure if it is an output parameter, and that field is ignored if the FSVolumeInfo structure is an input parameter. See “Volume Information Bitmap Constants” for a description of the constants you should use with this data type.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSVolumeInfoParam
Defines a parameter block used by low-level HFS Plus volume manipulation functions.
struct FSVolumeInfoParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
FSVolumeRefNum ioVRefNum;
UInt32 volumeIndex;
FSVolumeInfoBitmap whichInfo;
FSVolumeInfo * volumeInfo;
HFSUniStr255 * volumeName;
FSRef * ref;
};
typedef struct FSVolumeInfoParam FSVolumeInfoParam;
typedef FSVolumeInfoParam * FSVolumeInfoParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a volume name. This field is unused.
ioVRefNumThe volume reference number.
volumeIndexThe volume index. If this field is 0, the value in the
ioVRefNumfield only is used to identify the target volume.whichInfoA bitmap indicating which volume information fields to retrieve or set in the
FSVolumeInfostructure passed in thevolumeInfofield. See “Volume Information Bitmap Constants” for the meaning of the bits in this field.volumeInfoA pointer to a volume information structure containing the requested volume information on return, or the new values of the volume information to set on input. See
FSVolumeInfo.volumeNameOn output, a pointer to the volume’s name.
refA pointer to an
FSReffor the specified volume’s root directory.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSVolumeMountUPP
typedef FSVolumeMountProcPtr FSVolumeMountUPP;
Discussion
For more information, see the description of the FSVolumeMountProcPtr callback function.
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeOperation
typedef struct OpaqueFSVolumeOperation * FSVolumeOperation;
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hFSVolumeRefNum
Identifies a particular mounted volume.
typedef SInt16 FSVolumeRefNum;
Discussion
This data type is the same as the 16-bit volume refnum previously passed in the ioVRefNum fields of a parameter block; this is simply a new type name for the old data type.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hFSVolumeUnmountUPP
typedef FSVolumeUnmountProcPtr FSVolumeUnmountUPP;
Discussion
For more information, see the description of the FSVolumeUnmountProcPtr callback function.
Availability
- Available in OS X v10.2 and later.
Declared In
Files.hGetVolParmsInfoBuffer
Defines a volume attributes buffer, used by the PBHGetVolParmsSync and PBHGetVolParmAsync functions to return volume information.
struct GetVolParmsInfoBuffer {
short vMVersion;
long vMAttrib;
Handle vMLocalHand;
long vMServerAdr;
long vMVolumeGrade;
short vMForeignPrivID;
long vMExtendedAttributes;
void * vMDeviceID;
UniCharCount vMMaxNameLength;
};
typedef struct GetVolParmsInfoBuffer GetVolParmsInfoBuffer;
Fields
vMVersionThe version number of the attributes buffer structure. Currently this field returns 1, 2, 3 or 4. Version 3 is introduced to support the HFS Plus APIs.
vMAttribA 32-bit quantity that encodes information about the volume attributes. See “Volume Attribute Constants” for the meaning of the bits in this field.
vMLocalHandA handle to private data for shared volumes. On creation of the VCB (right after mounting), this field is a handle to a 2-byte block of memory. The Finder uses this for its local window list storage, allocating and deallocating memory as needed. It is disposed of when the volume is unmounted. Your application should treat this field as reserved.
vMServerAdrFor AppleTalk server volumes, this field contains the internet address of an AppleTalk server volume. Your application can inspect this field to tell which volumes belong to which server; the value of this field is 0 if the volume does not have a server.
vMVolumeGradeThe relative speed rating of the volume. The scale used to determine these values is currently uncalibrated. In general, lower values indicate faster speeds. A value of 0 indicates that the volume’s speed is unrated. The buffer version returned in the
vMVersionfield must be greater than 1 for this field to be meaningful.vMForeignPrivIDAn integer representing the privilege model supported by the volume. Currently two values are defined for this field: 0 represents a standard HFS or HFS Plus volume that might or might not support the AFP privilege model;
fsUnixPrivrepresents a volume that supports the A/UX privilege model. The buffer version returned in thevMVersionfield must be greater than 1 for this field to be meaningful.vMExtendedAttributesContains bits that describe a volume’s extended attributes. For this field to be meaningful, the
vMVersionmust be greater than 2. See “Extended Volume Attributes” for the meaning of the bits in this field.vMDeviceIDA device name identifying the device in /dev that corresponds to the volume. You can use this string to build a POSIX path to the device for use with IOKit APIs.
vMMaxNameLength
Discussion
Volumes that implement the HFS Plus APIs must use version 3 (or newer) of the GetVolParmsInfoBuffer. Volumes that don’t implement the HFS Plus APIs may still implement version 3 of the GetVolParmsInfoBuffer. If the version of the GetVolParmsInfoBuffer is 2 or less, or the bSupportsHFSPlusAPIs bit is clear (zero), then the volume does not implement the HFS Plus APIs, and they are being emulated for that volume by the File Manager itself.
If a volume does not implement the HFS Plus APIs, and supports version 2 or earlier of the GetVolParmsInfoBuffer, it cannot itself describe whether it supports the FSCatalogSearch or FSExchangeObjects calls. The compatibility layer will implement the FSCatalogSearch call if the volume supports the PBCatSearch call (i.e. the bHasCatSearch bit of vMAttrib is set). The compatibility layer will implement the FSExchangeObjects call if the volume supports PBExchangeFiles (i.e. the bHasFileIDs bit of vMAttrib is set).
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hHFileInfo
Defines a structure which holds catalog information about a file.
struct HFileInfo {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioFRefNum;
SInt8 ioFVersNum;
SInt8 filler1;
short ioFDirIndex;
SInt8 ioFlAttrib;
SInt8 ioACUser;
FInfo ioFlFndrInfo;
long ioDirID;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
unsigned long ioFlBkDat;
FXInfo ioFlXFndrInfo;
long ioFlParID;
long ioFlClpSiz;
};
typedef struct HFileInfo HFileInfo;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioFRefNumThe file reference number of an open file.
ioFVersNumA file version number. This field is no longer used. File version numbers are an artifact of the obsolete MFS, and are not supported on HFS volumes. You should always set this field to 0.
filler1Reserved.
ioFDirIndexA file and directory index. If this field contains a positive number,
PBGetCatInfoSyncandPBGetCatInfoAsyncreturn information about the file or directory having that directory index in the directory specified by theioVRefNumfield. (IfioVRefNumcontains a volume reference number, the specified directory is that volume’s root directory.)If this field contains 0,
PBGetCatInfoSyncorPBGetCatInfoAsyncreturns information about the file or directory whose name is specified in theioNamePtrfield and that is located in the directory specified by theioVRefNumfield. (Once again, ifioVRefNumcontains a volume reference number, the specified directory is that volume’s root directory.)If this field contains a negative number,
PBGetCatInfoSyncorPBGetCatInfoAsyncignores theioNamePtrfield and returns information about the directory specified in theioDirIDfield. If bothioDirIDandioVRefNumare set to 0,PBGetCatInfoSyncorPBGetCatInfoAsyncreturns information about the current default directory.ioFlAttribFile or directory attributes. See “File Attribute Constants” for the meaning of the bits in this field.
ioACUserThe user’s access rights for the specified directory. See “User Privileges Constants” for the meaning of the bits in this field.
ioFlFndrInfoFinder information.
ioDirIDA directory ID or file ID. On input to
PBGetCatInfoSyncorPBGetCatInfoAsync, this field contains a directory ID (which is used only if theioFDirIndexfield is negative). On output, this field contains the file ID of the specified file.ioFlStBlkThe first allocation block of the data fork. This field contains 0 if the file’s data fork is empty.
ioFlLgLenThe logical length (logical end-of-file) of the data fork.
ioFlPyLenThe physical length (physical end-of-file) of the data fork.
ioFlRStBlkThe first allocation block of the resource fork.
ioFlRLgLenThe logical length (logical end-of-file) of the resource fork.
ioFlRPyLenThe physical length (physical end-of-file) of the resource fork.
ioFlCrDatThe date and time of the file’s creation, in seconds since midnight, January 1, 1904. However, on OS X, if you set the creation date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970, and that is the value which will be returned if you later try to retrieve the creation date.
Note that file systems other than AFP, HFS and HFS Plus do not generally support creation dates.
ioFlMdDatThe date and time of the last modification to the file, in seconds since midnight, January 1, 1904. However, on OS X, if you set the modification date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970.
ioFlBkDatThe date and time that the file was last backed up, in seconds since midnight, January 1, 1904. However, on OS X, if you set the backup date to a date between January 1, 1904 and January 1, 1970, it will be clipped to January 1, 1970.
Note that file systems other than AFP, HFS and HFS Plus do not generally support backup dates.
ioFlXFndrInfoAdditional Finder information.
ioFlParIDThe directory ID of the file’s parent directory.
ioFlClpSizThe clump size to be used when writing the file if it’s 0, the volume’s clump size is used when the file is opened.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hHFileParam
Defines a parameter block used by low-level HFS functions for file creation, deletion, and information retrieval.
struct HFileParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioFRefNum;
SInt8 ioFVersNum;
SInt8 filler1;
short ioFDirIndex;
SInt8 ioFlAttrib;
SInt8 ioFlVersNum;
FInfo ioFlFndrInfo;
long ioDirID;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
};
typedef struct HFileParam HFileParam;
typedef HFileParam * HFileParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioFRefNumThe file reference number of an open file.
ioFVersNumA file version number. This field is no longer used. File version numbers are an artifact of the obsolete MFS, and are not supported on HFS volumes. You should always set this field to 0.
filler1Reserved.
ioFDirIndexA directory index for use with the
PBHGetFInfoSyncandPBHGetFInfoAsyncfunctions.ioFlAttribFile attributes. See “File Attribute Constants” for the meaning of the bits in this field.
ioFlVersNumA file version number. This feature is no longer supported, and you must always set this field to 0.
ioFlFndrInfoInformation used by the Finder.
ioDirIDA directory ID.
ioFlStBlkThe first allocation block of the data fork. This field contains 0 if the file’s data fork is empty.
ioFlLgLenThe logical length (logical end-of-file) of the data fork.
ioFlPyLenThe physical length (physical end-of-file) of the data fork.
ioFlRStBlkThe first allocation block of the resource fork. This field contains 0 if the file’s resource fork is empty.
ioFlRLgLenThe logical length (logical end-of-file) of the resource fork.
ioFlRPyLenThe physical length (physical end-of-file) of the resource fork.
ioFlCrDatThe date and time of the file’s creation, specified in seconds since midnight, January 1, 1904.
ioFlMdDatThe date and time of the last modification to the file, specified in seconds since midnight, January 1, 1904.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hHFSUniStr255
Used by the File Manager to return Unicode strings.
struct HFSUniStr255 {
UInt16 length;
UniChar unicode[255];
};
typedef struct HFSUniStr255 HFSUniStr255;
Fields
lengthThe number of unicode characters in the string.
unicodeThe string, in unicode characters.
Discussion
This data type is a string of up to 255 16-bit Unicode characters, with a preceding 16-bit length (number of characters). Note that only the first length characters have meaningful values; the remaining characters may be set to arbitrary values. A caller should always assume that the entire structure will be modified, even if the actual string length is less than 255.
Availability
- Available in OS X v10.0 and later.
Declared In
hfs_format.hHIOParam
Defines a parameter block used by low-level HFS I/O functions.
struct HIOParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioRefNum;
SInt8 ioVersNum;
SInt8 ioPermssn;
Ptr ioMisc;
Ptr ioBuffer;
long ioReqCount;
long ioActCount;
short ioPosMode;
long ioPosOffset;
};
typedef struct HIOParam HIOParam;
typedef HIOParam * HIOParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioRefNumThe file reference number of an open file.
ioVersNumA version number. This field is no longer used and you should always set it to 0.
ioPermssnThe access mode. See “File Access Permission Constants.”
ioMiscDepending on the function called, this field contains either a logical end-of-file, a new version number, a pointer to an access path buffer, or a pointer to a new pathname. Because
ioMiscis of typePtr, you’ll need to perform type coercion to interpret the value ofioMisccorrectly when it contains an end-of-file (aLongIntvalue) or version number (aSignedBytevalue).ioBufferA pointer to a data buffer into which data is written by
PBReadSyncandPBReadAsynccalls, and from which data is read byPBWriteSyncandPBWriteAsynccalls.ioReqCountThe requested number of bytes to be read, written, or allocated.
ioActCountThe number of bytes actually read, written, or allocated.
ioPosModeThe positioning mode (base location) for setting the mark. Bits 0 and 1 of this field indicate how to position the mark; you can use the constants described in “Position Mode Constants” to set or test their value.
You can also use the constants described in “Cache Constants” to indicate whether or not to cache the data.
ioPosOffsetThe offset to be used in conjunction with the base location specified in the
ioPosModefield.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hHParamBlockRec
Describes the HFS parameter block.
union HParamBlockRec {
HIOParam ioParam;
HFileParam fileParam;
HVolumeParam volumeParam;
AccessParam accessParam;
ObjParam objParam;
CopyParam copyParam;
WDParam wdParam;
FIDParam fidParam;
CSParam csParam;
ForeignPrivParam foreignPrivParam;
};
typedef union HParamBlockRec HParamBlockRec;
typedef HParamBlockRec * HParmBlkPtr;
Fields
ioParamA parameter block used by low-level HFS I/O functions. See
HIOParam.fileParamA parameter block used by low-level HFS functions for file creation, deletion, and information retrieval. See
HFileParam.volumeParamA parameter block used by low-level HFS volume manipulation functions. See
HVolumeParam.accessParamA parameter block used by low-level HFS file and directory access rights manipulation functions. See
AccessParam.objParamA parameter block used by low-level HFS user and group information functions. See
ObjParam.copyParamA parameter block used by low-level HFS file copying functions. See
CopyParam.wdParamA parameter block used by low-level HFS working directory functions. See
WDParam.fidParamA parameter block used by low-level HFS file ID functions. See
FIDParam.csParamA parameter block used by low-level HFS catalog search functions. See
CSParam.foreignPrivParamA parameter block used by low-level HFS foreign privileges functions. See
ForeignPrivParam.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hHVolumeParam
Defines a parameter block used by low-level HFS volume manipulation functions.
struct HVolumeParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler2;
short ioVolIndex;
unsigned long ioVCrDate;
unsigned long ioVLsMod;
short ioVAtrb;
unsigned short ioVNmFls;
unsigned short ioVBitMap;
unsigned short ioAllocPtr;
unsigned short ioVNmAlBlks;
unsigned long ioVAlBlkSiz;
unsigned long ioVClpSiz;
unsigned short ioAlBlSt;
unsigned long ioVNxtCNID;
unsigned short ioVFrBlk;
unsigned short ioVSigWord;
short ioVDrvInfo;
short ioVDRefNum;
short ioVFSID;
unsigned long ioVBkUp;
short ioVSeqNum;
unsigned long ioVWrCnt;
unsigned long ioVFilCnt;
unsigned long ioVDirCnt;
long ioVFndrInfo[8];
};
typedef struct HVolumeParam HVolumeParam;
typedef HVolumeParam * HVolumeParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler2Reserved.
ioVolIndexA volume index for use with the
PBHGetVInfoSyncandPBHGetVInfoAsyncfunctions.ioVCrDateThe date and time of the volume’s initialization.
ioVLsModThe date and time the volume information was last modified. (This field is not changed when information is written to a file and does not necessarily indicate when the volume was flushed.
ioVAtrbThe volume attributes. See “Volume Information Attribute Constants” for the meanings of the bits in this field.
ioVNmFlsThe number of files in the root directory of the volume. For performance reasons, the Carbon File Manager does not return the number of files in this field; instead, it sets
ioVNmFlsto 0.To determine the number of files in the root directory of a volume in Carbon, call
PBGetCatInfoAsyncorPBGetCatInfoSyncfor the root directory. The number of files in the root directory is returned in theioDrNmFlsfield.ioVBitMapThe first block of the volume bitmap.
ioAllocPtrThe block at which the next new file starts. Used internally.
ioVNmAlBlksThe number of allocation blocks.
ioVAlBlkSizThe size of allocation blocks.
ioVClpSizThe clump size.
ioAlBlStThe first block in the volume map.
ioVNxtCNIDThe next unused catalog node ID.
ioVFrBlkThe number of unused allocation blocks.
ioVSigWordA signature word identifying the type of volume it’s $D2D7 for MFS volumes and $4244 for volumes that support HFS calls.
ioVDrvInfoThe drive number of the drive containing the volume.
ioVDRefNumFor online volumes, the reference number of the I/O driver for the drive identified by the
ioVDrvInfofield.ioVFSIDThe file-system identifier. It indicates which file system is servicing the volume it’s zero for File Manager volumes and nonzero for volumes handled by an external file system.
ioVBkUpThe date and time the volume was last backed up; this is 0 if the volume has never been backed up.
ioVSeqNumUsed internally.
ioVWrCntThe volume write count.
ioVFilCntThe total number of files on the volume.
ioVDirCntThe total number of directories (not including the root directory) on the volume.
ioVFndrInfoInformation used by the Finder.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hIOCompletionUPP
A universal procedure pointer to an application-defined completion function.
typedef IOCompletionProcPtr IOCompletionUPP;
Discussion
See IOCompletionProcPtr.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hIOParam
Defines a parameter block used by low-level I/O functions.
struct IOParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioRefNum;
SInt8 ioVersNum;
SInt8 ioPermssn;
Ptr ioMisc;
Ptr ioBuffer;
long ioReqCount;
long ioActCount;
short ioPosMode;
long ioPosOffset;
};
typedef struct IOParam IOParam;
typedef IOParam * IOParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioRefNumThe file reference number of an open file.
ioVersNumA version number. This field is no longer used and you should always set it to 0.
ioPermssnThe access mode. See “File Access Permission Constants.”
ioMiscDepending on the function called, this field contains either a new logical end-of-file (for the
PBGetEOFSync/ PBGetEOFAsyncandPBSetEOFSync/ PBSetEOFAsyncfunctions), a new version number, or a pointer to a new pathname (for thePBHRenameSync/PBHRenameAsyncfunctions). BecauseioMiscis of typePtr, you’ll need to perform type coercion to interpret the value ofioMisccorrectly when it contains an end-of-file (aLongIntvalue) or version number (aSignedBytevalue).ioBufferA pointer to a data buffer into which data is written by
PBReadSyncandPBReadAsynccalls; and from which data is read byPBWriteSyncandPBWriteAsynccalls.ioReqCountThe requested number of bytes to be read, written, or allocated.
ioActCountThe number of bytes actually read, written, or allocated.
ioPosModeThe positioning mode (base location) for positioning the file mark. Bits 0 and 1 of this field indicate how to position the mark; you can use the constants described in “Position Mode Constants” to set or test their value.
You can also use the constants described in “Cache Constants” to indicate whether the data should be cached.
ioPosOffsetThe offset to be used in conjunction with the base location specified in the
ioPosModefield.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hMultiDevParam
Defines a parameter block used by low-level functions in the classic Device Manager to access multiple devices.
struct MultiDevParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioMRefNum;
SInt8 ioMVersNum;
SInt8 ioMPermssn;
Ptr ioMMix;
short ioMFlags;
Ptr ioSEBlkPtr;
};
typedef struct MultiDevParam MultiDevParam;
typedef MultiDevParam * MultiDevParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioMRefNumThe driver reference number.
ioMVersNumThe slot version number.
ioMPermssnPermissions.
ioMMixReserved.
ioMFlagsFlags specifying the number of additional fields. You should set the
fMultibit (bit 0) of this field and clear all of the other bits.ioSEBlkPtrA pointer to an external parameter block that is customized for the devices installed in the slot.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hObjParam
Defines a parameter block used by low-level HFS user and group information functions.
struct ObjParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short filler7;
short ioObjType;
StringPtr ioObjNamePtr;
long ioObjID;
};
typedef struct ObjParam ObjParam;
typedef ObjParam * ObjParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler7Reserved.
ioObjTypeA function code. The values passed in this field are determined by the function to which you pass this parameter block.
ioObjNamePtrA pointer to the returned creator/group name.
ioObjIDThe creator/group ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hParamBlockRec
Describes the basic File Manager parameter block.
union ParamBlockRec {
IOParam ioParam;
FileParam fileParam;
VolumeParam volumeParam;
CntrlParam cntrlParam;
SlotDevParam slotDevParam;
MultiDevParam multiDevParam;
};
typedef union ParamBlockRec ParamBlockRec;
typedef ParamBlockRec * ParmBlkPtr;
Fields
ioParamfileParamvolumeParamcntrlParamslotDevParammultiDevParam
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hSlotDevParam
Defines a parameter block used by low-level functions in the classic Device Manager to access a single slot device.
struct SlotDevParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioSRefNum;
SInt8 ioSVersNum;
SInt8 ioSPermssn;
Ptr ioSMix;
short ioSFlags;
SInt8 ioSlot;
SInt8 ioID;
};
typedef struct SlotDevParam SlotDevParam;
typedef SlotDevParam * SlotDevParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioSRefNumThe driver reference number.
ioSVersNumThe slot version number.
ioSPermssnPermissions.
ioSMixReserved.
ioSFlagsFlags determining the number of additional fields. You should clear all of the bits in this field.
ioSlotThe slot number.
ioIDThe slot resource ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hVCB
Defines a volume control block.
struct VCB {
QElemPtr qLink;
short qType;
short vcbFlags;
unsigned short vcbSigWord;
unsigned long vcbCrDate;
unsigned long vcbLsMod;
short vcbAtrb;
unsigned short vcbNmFls;
short vcbVBMSt;
short vcbAllocPtr;
unsigned short vcbNmAlBlks;
long vcbAlBlkSiz;
long vcbClpSiz;
short vcbAlBlSt;
long vcbNxtCNID;
unsigned short vcbFreeBks;
Str27 vcbVN;
short vcbDrvNum;
short vcbDRefNum;
short vcbFSID;
short vcbVRefNum;
Ptr vcbMAdr;
Ptr vcbBufAdr;
short vcbMLen;
short vcbDirIndex;
short vcbDirBlk;
unsigned long vcbVolBkUp;
unsigned short vcbVSeqNum;
long vcbWrCnt;
long vcbXTClpSiz;
long vcbCTClpSiz;
unsigned short vcbNmRtDirs;
long vcbFilCnt;
long vcbDirCnt;
long vcbFndrInfo[8];
unsigned short vcbVCSize;
unsigned short vcbVBMCSiz;
unsigned short vcbCtlCSiz;
unsigned short vcbXTAlBlks;
unsigned short vcbCTAlBlks;
short vcbXTRef;
short vcbCTRef;
Ptr vcbCtlBuf;
long vcbDirIDM;
short vcbOffsM;
};
typedef struct VCB VCB;
typedef VCB * VCBPtr;
Fields
qLinkA pointer to the next entry in the VCB queue.
qTypeThe queue type. When the volume is mounted and the VCB is created, this field is cleared. Thereafter, bit 7 of this field is set whenever a file on that volume is opened.
vcbFlagsVolume flags. Bit 15 is set if the volume information has been changed by a File Manager call since the volume was last flushed by a
FlushVolcall. See “Volume Control Block Flags.”vcbSigWordThe volume signature.
vcbCrDateThe date and time of the volume’s creation (initialization).
vcbLsModThe date and time of the volume’s last modification. This is not necessarily when the volume was last flushed.
vcbAtrbThe volume attributes.
vcbNmFlsThe number of files in the root directory of the volume.
vcbVBMStThe first block of the volume bitmap.
vcbAllocPtrThe start block of the next allocation search. This field is used internally.
vcbNmAlBlksThe number of allocation blocks in the volume.
vcbAlBlkSizThe allocation block size, in bytes. This value must always be a multiple of 512 bytes.
vcbClpSizThe default clump size.
vcbAlBlStThe first allocation block in the volume.
vcbNxtCNIDThe next unused catalog node ID (directory or file ID).
vcbFreeBksThe number of unused allocation blocks on the volume.
vcbVNThe volume name. Note that a volume name can occupy at most 27 characters; this is an exception to the normal file and directory name limit of 31 characters.
vcbDrvNumThe drive number of the drive on which the volume is located. When a mounted drive is placed offline or ejected, this field is set to 0.
vcbDRefNumThe driver reference number of the driver used to access the volume When a volume is ejected, this field is set to the previous value of the
vcbDrvNumfield (and hence is a positive number). When a volume is placed offline, this field is set to the negative of the previous value of thevcbDrvNumfield (and hence is a negative number).vcbFSIDAn identifier for the file system handling the volume it’s zero for volumes handled by the File Manager and nonzero for volumes handled by other file systems.
vcbVRefNumThe volume reference number of the volume.
vcbMAdrUsed internally.
vcbBufAdrUsed internally.
vcbMLenUsed internally.
vcbDirIndexUsed internally.
vcbDirBlkUsed internally.
vcbVolBkUpThe date and time that the volume was last backed up.
vcbVSeqNumUsed internally.
vcbWrCntThe volume write count.
vcbXTClpSizThe clump size of the extents overflow file.
vcbCTClpSizThe clump size of the catalog file.
vcbNmRtDirsThe number of directories in the root directory.
vcbFilCntThe total number of files on the volume.
vcbDirCntThe total number of directories on the volume.
vcbFndrInfoFinder information.
vcbVCSizeUsed internally.
vcbVBMCSizUsed internally.
vcbCtlCSizUsed internally.
vcbXTAlBlksThe size, in allocation blocks, of the extents overflow file.
vcbCTAlBlksThe size, in allocation blocks, of the catalog file.
vcbXTRefThe path reference number for the extents overflow file.
vcbCTRefThe path reference number for the catalog file.
vcbCtlBufA pointer to the extents and catalog caches.
vcbDirIDMThe directory last searched.
vcbOffsMThe offspring index at the last search.
Discussion
The volume control block queue is a standard operating system queue that’s maintained in the system heap. It contains a volume control block for each mounted volume. A volume control block is a nonrelocatable block that contains volume-specific information.
Each time a volume is mounted, the File Manager reads its volume information from the master directory block and uses the information to build a new volume control block (VCB) in the volume control block queue (unless an ejected or offline volume is being remounted). The File Manager also creates a volume buffer in the system heap. When a volume is placed offline, its buffer is released. When a volume is unmounted, its VCB is removed from the VCB queue as well.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hVolMountInfoHeader
Defines a volume mounting information header structure for remote volumes.
struct VolMountInfoHeader {
short length;
VolumeType media;
};
typedef struct VolMountInfoHeader VolMountInfoHeader;
typedef VolMountInfoHeader * VolMountInfoPtr;
Fields
lengthThe length of the
VolMountInfoHeaderstructure, which is the total length of the structure header described here, plus the variable-length location data which follows the header.mediaThe volume type of the remote volume. The
AppleShareMediaTyperepresents an AppleShare volume.If you are adding support for the programmatic mounting functions to a non-Macintosh file system, you should register a four-character identifier for your volumes with DTS.
Discussion
To mount a remote server, fill out an VolMountInfoHeader structure using the PBGetVolMountInfo function and then pass this structure to the PBVolumeMount function to mount the volume.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hVolumeMountInfoHeader
Defines an extended volume mounting information header structure for remote volumes.
struct VolumeMountInfoHeader {
short length;
VolumeType media;
short flags;
};
typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
typedef VolumeMountInfoHeader * VolumeMountInfoHeaderPtr;
Fields
lengthThe length of the
VolumeMountInfoHeaderstructure, which is the total length of the structure header described here, plus the variable-length location data which follows the header.mediaThe volume type of the remote volume. The
AppleShareMediaTyperepresents an AppleShare volume.If you are adding support for the programmatic mounting functions to a non-Macintosh file system, you should register a four-character identifier for your volumes with DTS.
flagsThe volume mount flags. See “Volume Mount Flags.”
Discussion
This volume mount info record supersedes the VolMountInfoHeader structure; VolMountInfoHeader is included for compatibility. The VolumeMountInfoHeader record allows access to the volume mount flags by foreign filesystem writers.
To mount a remote server, fill out an VolumeMountInfoHeader structure using the PBGetVolMountInfo function and then pass this structure to the PBVolumeMount function to mount the volume.
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hVolumeParam
Defines a parameter block used by low-level volume manipulation functions.
struct VolumeParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler2;
short ioVolIndex;
unsigned long ioVCrDate;
unsigned long ioVLsBkUp;
unsigned short ioVAtrb;
unsigned short ioVNmFls;
unsigned short ioVDirSt;
short ioVBlLn;
unsigned short ioVNmAlBlks;
unsigned long ioVAlBlkSiz;
unsigned long ioVClpSiz;
unsigned short ioAlBlSt;
unsigned long ioVNxtFNum;
unsigned short ioVFrBlk;
};
typedef struct VolumeParam VolumeParam;
typedef VolumeParam * VolumeParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler2Reserved.
ioVolIndexThe volume index.
ioVCrDateThe date and time of the volume’s initialization.
ioVLsBkUpThe date and time the volume information was last modified. (This field is not changed when information is written to a file and does not necessarily indicate when the volume was flushed.
ioVAtrbThe volume attributes. See “Volume Information Attribute Constants” for the meanings of the bits in this field.
ioVNmFlsThe number of files in the root directory.
ioVDirStThe first block of the volume directory.
ioVBlLnLength of directory in blocks.
ioVNmAlBlksThe number of allocation blocks.
ioVAlBlkSizThe size of allocation blocks.
ioVClpSizThe volume clump size.
ioAlBlStThe first block in the volume map.
ioVNxtFNumThe next unused file number.
ioVFrBlkThe number of unused allocation blocks.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hVolumeType
Defines the “signature” of the file system.
typedef OSType VolumeType;
Availability
- Available in OS X v10.0 and later.
Declared In
Files.hWDParam
Defines a parameter block used by low-level HFS working directory functions.
struct WDParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioWDCreated;
short ioWDIndex;
long ioWDProcID;
short ioWDVRefNum;
short filler10;
long filler11;
long filler12;
long filler13;
long ioWDDirID;
};
typedef struct WDParam WDParam;
typedef WDParam * WDParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioWDCreatedioWDIndexAn index to working directories.
ioWDProcIDioWDVRefNumThe volume reference number for the working directory.
filler10Reserved.
filler11Reserved.
filler12Reserved.
filler13The working directory’s directory ID.
ioWDDirIDThe working directory’s directory ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hWDPBRec
Defines a working directory parameter block.
struct WDPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short filler1;
short ioWDIndex;
long ioWDProcID;
short ioWDVRefNum;
short filler2[7];
long ioWDDirID;
};
typedef struct WDPBRec WDPBRec;
typedef WDPBRec * WDPBPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler1Reserved.
ioWDIndexAn index.
ioWDProcIDAn identifier that’s used to distinguish between working directories set up by different users you should set
ioWDProcIDto your application’s signature.ioWDVRefNumThe working directory’s volume reference number.
filler2Reserved.
ioWDDirIDThe working directory’s directory ID.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hXCInfoPBRec
Defines an extended catalog information parameter block.
struct XCInfoPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
ProcPtr ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler1;
StringPtr ioShortNamePtr;
short filler2;
short ioPDType;
long ioPDAuxType;
long filler3[2];
long ioDirID;
};
typedef struct XCInfoPBRec XCInfoPBRec;
typedef XCInfoPBRec * XCInfoPBPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
filler1Reserved; set this field to 0.
ioShortNamePtrA pointer to a Pascal string buffer, of a minimum 13 bytes, which holds the file or directory’s short name (MS-DOS format name). This field is required and cannot be
NULL.filler2Reserved; set this field to 0.
ioPDTypeThe ProDOS file type of the file or directory.
ioPDAuxTypeThe ProDOS auxiliary type of the file or directory.
filler3Reserved; set this field to 0.
ioDirIDA directory ID.
Discussion
The PBGetXCatInfoSync and PBGetXCatInfoAsync functions use this parameter block to return the short name and ProDOS information for files and directories.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hXIOParam
Defines an extended I/O parameter block structure.
struct XIOParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioRefNum;
SInt8 ioVersNum;
SInt8 ioPermssn;
Ptr ioMisc;
Ptr ioBuffer;
long ioReqCount;
long ioActCount;
short ioPosMode;
wide ioWPosOffset;
};
typedef struct XIOParam XIOParam;
typedef XIOParam * XIOParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioRefNumThe file reference number of an open file.
ioVersNumA version number. This field is no longer used and you should always set it to 0.
ioPermssnThe access mode. See “File Access Permission Constants.”
ioMiscDepending on the function called, this field contains either a logical end-of-file, a new version number, a pointer to an access path buffer, or a pointer to a new pathname. Because
ioMiscis of typePtr, you’ll need to perform type coercion to interpret the value ofioMisccorrectly when it contains an end-of-file (aLongIntvalue) or version number (aSignedBytevalue).ioBufferA pointer to a data buffer into which data is written by
_Readcalls and from which data is read by_Writecalls.ioReqCountThe requested number of bytes to be read or written.
ioActCountThe number of bytes actually read or written.
ioPosModeThe positioning mode (base location) for setting the mark. Bits 0 and 1 of this field indicate how to position the mark; you can use the constants described in “Position Mode Constants” to set or test their value. For the functions which use this parameter block, you must have the
kUseWidePositioningbit set. See “Large Volume Constants” for a description of this and other constants.You can also use the constants described in “Cache Constants” to indicate whether or not to cache the data.
ioWPosOffsetThe wide positioning offset to be used in conjunction with the positioning mode specified in the
ioPosModefield.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hXVolumeParam
Defines an extended volume information parameter block.
struct XVolumeParam {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
IOCompletionUPP ioCompletion;
volatile OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
unsigned long ioXVersion;
short ioVolIndex;
unsigned long ioVCrDate;
unsigned long ioVLsMod;
short ioVAtrb;
unsigned short ioVNmFls;
unsigned short ioVBitMap;
unsigned short ioAllocPtr;
unsigned short ioVNmAlBlks;
unsigned long ioVAlBlkSiz;
unsigned long ioVClpSiz;
unsigned short ioAlBlSt;
unsigned long ioVNxtCNID;
unsigned short ioVFrBlk;
unsigned short ioVSigWord;
short ioVDrvInfo;
short ioVDRefNum;
short ioVFSID;
unsigned long ioVBkUp;
short ioVSeqNum;
unsigned long ioVWrCnt;
unsigned long ioVFilCnt;
unsigned long ioVDirCnt;
long ioVFndrInfo[8];
UInt64 ioVTotalBytes;
UInt64 ioVFreeBytes;
};
typedef struct XVolumeParam XVolumeParam;
typedef XVolumeParam * XVolumeParamPtr;
Fields
qLinkA pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.
qTypeThe queue type. This field is used internally by the File Manager.
ioTrapThe trap number of the function that was called. This field is used internally by the File Manager.
ioCmdAddrThe address of the function that was called. This field is used internally by the File Manager.
ioCompletionA universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 for all synchronous calls. See
IOCompletionProcPtrfor information about completion routines.ioResultThe result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field it’s set to a positive number when the call is made and receives the actual result code when the call is completed.
ioNamePtrA pointer to a pathname. Whenever a function description specifies that
ioNamePtris used—whether for input, output, or both—it’s very important that you set this field to point to storage for aStr255value (if you’re using a pathname) or toNULL(if you’re not).ioVRefNumA volume reference number, 0 for the default volume, or a drive number.
ioXVersionThe version of the
XVolumeParamparameter block; currently, this is 0.ioVolIndexA volume index for use with the
PBXGetVolInfoSyncandPBXGetVolInfoAsyncfunctions.ioVCrDateThe date and time that the volume was created (initialized).
ioVLsModThe date and time that the volume information was last modified. This field is not changed when information is written to a file and does not necessarily indicate when the volume was flushed.
ioVAtrbThe volume attributes. See “Volume Information Attribute Constants” for the meanings of the bits in this field.
ioVNmFlsThe number of files in the root directory.
ioVBitMapThe first block of the volume bitmap.
ioAllocPtrThe block at which the next new file starts. Used internally.
ioVNmAlBlksThe number of allocation blocks.
ioVAlBlkSizThe size of the allocation blocks.
ioVClpSizThe clump size.
ioAlBlStThe first block in the volume map.
ioVNxtCNIDThe next unused catalog node ID.
ioVFrBlkThe number of unused allocation blocks.
ioVSigWordA signature word identifying the type of volume it’s $D2D7 for MFS volumes and $4244 for volumes that support HFS calls.
ioVDrvInfoThe drive number of the drive containing the volume.
ioVDRefNumFor online volumes, the reference number of the I/O driver for the drive identified by the
ioVDrvInfofield.ioVFSIDThe file-system identifier. It indicates which file system is servicing the volume it’s zero for File Manager volumes and nonzero for volumes handled by an external file system.
ioVBkUpThe date and time that the volume was last backed up; this is 0 if the volume has never been backed up.
ioVSeqNumUsed internally.
ioVWrCntThe volume write count.
ioVFilCntThe total number of files on the volume.
ioVDirCntThe total number of directories (not including the root directory) on the volume.
ioVFndrInfoInformation used by the Finder.
ioVTotalBytesThe total number of bytes on the volume.
ioVFreeBytesThe number of free bytes on the volume.
Discussion
The functions PBXGetVolInfoSync and PBXGetVolInfoAsync use this parameter block structure to pass arguments and return values.
Availability
- Available in OS X v10.0 and later.
- Not available to 64-bit applications.
Declared In
Files.hConstants
AFP Tag Length Constants
Specify the length of tagged address information for AppleShare volumes.
enum {
kAFPTagLengthIP = 0x06,
kAFPTagLengthIPPort = 0x08,
kAFPTagLengthDDP = 0x06
};
Constants
kAFPTagLengthIPThe length of a 4 byte IP address.
Available in OS X v10.0 and later.
Declared in
Files.h.kAFPTagLengthIPPortThe length of a 4 byte IP address and a 2 byte port.
Available in OS X v10.0 and later.
Declared in
Files.h.kAFPTagLengthDDPAvailable in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the fLength field of the AFPTagData structure to indicate the length, in bytes, of the tagged address information. This length includes the fLength field itself.
AFP Tag Type Constants
Specify the type of tagged address information for AppleShare clients.
enum {
kAFPTagTypeIP = 0x01,
kAFPTagTypeIPPort = 0x02,
kAFPTagTypeDDP = 0x03,
kAFPTagTypeDNS = 0x04
};
Constants
kAFPTagTypeIPA basic 4 byte IP address, most significant byte first.
Available in OS X v10.0 and later.
Declared in
Files.h.kAFPTagTypeIPPortA 4 byte IP address and a 2 byte port number, most significant byte first.
Available in OS X v10.0 and later.
Declared in
Files.h.kAFPTagTypeDDPAvailable in OS X v10.0 and later.
Declared in
Files.h.kAFPTagTypeDNSThe address is a DNS name in address:port format. The total length of the DNS name is variable up to 254 characters.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the fType field of the tagged address structure, AFPTagData, to specify the type of address represented by the structure.
Allocation Flags
Indicate how new space is to be allocated.
typedef UInt16 FSAllocationFlags;
enum {
kFSAllocDefaultFlags = 0x0000,
kFSAllocAllOrNothingMask = 0x0001,
kFSAllocContiguousMask = 0x0002,
kFSAllocNoRoundUpMask = 0x0004,
kFSAllocReservedMask = 0xFFF8
};
Constants
kFSAllocDefaultFlagsAllocate as much as possible, not necessarily contiguous.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSAllocAllOrNothingMaskThis bit is set when an allocation must allocate the total requested amount, or else fail with nothing allocated; when this bit is not set, the allocation may complete successfully but allocate less than requested.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSAllocContiguousMaskThis bit is set when an allocation should allocate one contiguous range of space on the volume. If this bit is clear, multiple discontiguous extents may be allocated to fulfill the request.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSAllocNoRoundUpMaskThis bit is set when an allocation should no round up to the clump size. If this bit is clear, then additional space beyond the amount requested may be allocated; this is done by some volume formats (including HFS and HFS Plus) to avoid many small allocation requests. If the bit is set, no additional allocation is done (except where required by the volume format, such as rounding up to a multiple of the allocation block size).
Available in OS X v10.0 and later.
Declared in
Files.h.kFSAllocReservedMaskReserved; set to zero.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
If the kFSAllocContiguousMask bit is set, then then any newly allocated space must be in one contiguous extent (preferably contiguous with any space already allocated). If kFSAllocAllOrNothingMask is set, then the entire requestCount bytes must be allocated for the call to succeed; if not set, as many bytes as possible will be allocated (without error). If kFSAllocNoRoundUpMask is set, then no additional space is allocated (such as rounding up to a multiple of a clump size); if clear, the volume format may allocate more space than requested as an attempt to reduce fragmentation.
AppleShare Volume Signature
Defines the volume signature for AppleShare volumes.
enum {
AppleShareMediaType = 'afpm'
};
Authentication Method Constants
Define the login methods for remote volumes.
enum {
kNoUserAuthentication = 1,
kPassword = 2,
kEncryptPassword = 3,
kTwoWayEncryptPassword = 6
};
Constants
kNoUserAuthenticationNo password.
Available in OS X v10.0 and later.
Declared in
Files.h.kPassword8-byte password.
Available in OS X v10.0 and later.
Declared in
Files.h.kEncryptPasswordEncrypted 8-byte password.
Available in OS X v10.0 and later.
Declared in
Files.h.kTwoWayEncryptPasswordTwo-way random encryption.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the uamType field of an AFPVolMountInfo structure and in the ioObjType field of the parameter block passed to the PBHGetLogInInfoSync and PBHGetLogInInfoAsync functions to specify the type of user authentication used by a remote volume.
Cache Constants
Indicate whether or not data should be cached.
enum {
pleaseCacheBit = 4,
pleaseCacheMask = 0x0010,
noCacheBit = 5,
noCacheMask = 0x0020,
rdVerifyBit = 6,
rdVerifyMask = 0x0040,
rdVerify = 64,
forceReadBit = 6,
forceReadMask = 0x0040,
newLineBit = 7,
newLineMask = 0x0080,
newLineCharMask = 0xFF00
};
Constants
pleaseCacheBitIndicates that the data should be cached.
Available in OS X v10.0 and later.
Declared in
Files.h.pleaseCacheMaskRequests that the data be cached, if possible. You should cache reads and writes if you read or write the same portion of a file multiple times.
Available in OS X v10.0 and later.
Declared in
Files.h.noCacheBitIndicates that data should not be cached.
Available in OS X v10.0 and later.
Declared in
Files.h.noCacheMaskRequests that the data not be cached, if possible. You should not cache reads and writes if you read or write data from a file only once.
Available in OS X v10.0 and later.
Declared in
Files.h.rdVerifyBitIndicates that all reads should come from the source and be verified against the data in memory.
Available in OS X v10.0 and later.
Declared in
Files.h.rdVerifyMaskRequests that all reads (not writes) come directly from the source and be verified against the data in memory. This flushes the cache and sends all read requests to the data source.
Available in OS X v10.0 and later.
Declared in
Files.h.rdVerifyThis is the old name of
rdVerifyMask. Both request that all reads come directly from the source of the data and be compared against the data in memory.Available in OS X v10.0 and later.
Declared in
Files.h.forceReadBitIndicates that reads should come from the disk.
Available in OS X v10.0 and later.
Declared in
Files.h.forceReadMaskForces reads from disk, bypassing all caches. Clients can use this to verify that data is stored correctly on the media (for example, to verify after writing) by reading the data into a different buffer while setting the bit, and then comparing the newly read data with the previously written data.
The
forceReadMaskis the same as therdVerifyMaskused in the older APIs. The actual implementation of therdVerifyMaskin the older APIs actually caused the “force read” behavior, and only compared the data in partial sectors.FSReadForkcleans up this behavior by always letting the client do all of the compares.Available in OS X v10.0 and later.
Declared in
Files.h.newLineBitIndicates that newline mode should be used for reads.
Available in OS X v10.0 and later.
Declared in
Files.h.newLineMaskRequests that newline mode be used for reads. In newline mode, the read stops when one of the following conditions is met:
The requested number of bytes have been read.
The end-of-file is reached.
The newline character has been read. If the newline character is found, it will be the last character put into the buffer and the number of bytes read will include it.
Available in OS X v10.0 and later.
Declared in
Files.h.newLineCharMaskAvailable in OS X v10.0 and later.
Declared in
Files.h.
Discussion
For the FSReadFork and FSWriteFork functions, and their parameter block equivalents, you may add either of the pleaseCacheMask or noCacheMask constants to one of the “Position Mode Constants” to hint whether the data should be cached or not.
The pleaseCacheBit and the noCacheBit are mutually exclusive and only one should be set at a time. If neither bit is set, the program has indicated that it doesn’t care if the data is cached or not.
Catalog Information Bitmap Constants
Specify what file or fork information to get or set.
enum {
kFSCatInfoNone = 0x00000000,
kFSCatInfoTextEncoding = 0x00000001,
kFSCatInfoNodeFlags = 0x00000002,
kFSCatInfoVolume = 0x00000004,
kFSCatInfoParentDirID = 0x00000008,
kFSCatInfoNodeID = 0x00000010,
kFSCatInfoCreateDate = 0x00000020,
kFSCatInfoContentMod = 0x00000040,
kFSCatInfoAttrMod = 0x00000080,
kFSCatInfoAccessDate = 0x00000100,
kFSCatInfoBackupDate = 0x00000200,
kFSCatInfoPermissions = 0x00000400,
kFSCatInfoFinderInfo = 0x00000800,
kFSCatInfoFinderXInfo = 0x00001000,
kFSCatInfoValence = 0x00002000,
kFSCatInfoDataSizes = 0x00004000,
kFSCatInfoRsrcSizes = 0x00008000,
kFSCatInfoSharingFlags = 0x00010000,
kFSCatInfoUserPrivs = 0x00020000,
kFSCatInfoUserAccess = 0x00080000,
kFSCatInfoSetOwnership = 0x00100000,
kFSCatInfoAllDates = 0x000003E0,
kFSCatInfoGettableInfo = 0x0003FFFF,
kFSCatInfoSettableInfo = 0x00001FE3,
kFSCatInfoReserved = 0xFFFC0000
};
Constants
kFSCatInfoNoneNo catalog information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoTextEncodingRetrieve or set the text encoding hint, in the
textEncodingHintfield.Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoNodeFlagsRetrieve or set the catalog node flags. Currently, you can only set bits 0 and 4. See “Catalog Information Node Flags” for more information on these flags.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoVolumeRetrieve the volume reference number of the volume on which the file or directory resides.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoParentDirIDRetrieve the parent directory ID.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoNodeIDRetrieve the file or directory ID.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoCreateDateRetrieve or set the creation date.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoContentModRetrieve or set the date that the resource or data fork was last modified.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoAttrModRetrieve or set the date that an attribute or named fork was last modified.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoAccessDateRetrieve or set the date that the fork or file was last accessed.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoBackupDateRetrieve or set the date that the fork or file was last backed up.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoPermissionsRetrieve or set the file or fork’s permissions.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoFinderInfoRetrieve or set the file or fork’s Finder information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoFinderXInfoRetrieve or set the file or fork’s extended Finder information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoValenceFor folders only, retrieve the valence of the folder. For files, this is zero.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoDataSizesRetrieve the logical and physical size of the data fork.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoRsrcSizesRetrieve the logical and physical size of the resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoSharingFlagsRetrieve the fork or file’s sharing flags:
kioFlAttribMountedBit,kioFlAttribSharePointBit. See “File Attribute Constants” for more information on these bits.Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoUserPrivsRetrieve the file’s user privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoUserAccessAvailable in OS X v10.1 and later.
Declared in
Files.h.kFSCatInfoSetOwnershipAttempt to set the file’s user and group (UID and GID). If the File Manager cannot set the the user or group ID, the call fails. (OS X only).
Available in OS X v10.3 and later.
Declared in
Files.h.kFSCatInfoAllDatesRetrieve or set all of the date information for the fork or file: creation date, modification dates, access date, backup date, etc.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoGettableInfoRetrieve all gettable data.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoSettableInfoSet all settable data. This includes the flags, dates, permissions, Finder info, and text encoding hint.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSCatInfoReservedRepresents bits that are currently reserved.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the FSCatalogInfoBitmap type to specify what file or fork information to get or set. If used with the FSGetCatalogInfo or FSGetCatalogInfoBulk functions, these constants tell the File Manager which fields to return information in. If used with the FSSetCatalogInfo function, these constants tell the File Manager which fields you’ve filled out with values that it should use to change the fork or file’s catalog information.
Catalog Information Node Flags
Define the values used in the nodeFlags field of the FSCatalogInfo structure.
enum {
kFSNodeLockedBit = 0,
kFSNodeLockedMask = 0x0001,
kFSNodeResOpenBit = 2,
kFSNodeResOpenMask = 0x0004,
kFSNodeDataOpenBit = 3,
kFSNodeDataOpenMask = 0x0008,
kFSNodeIsDirectoryBit = 4,
kFSNodeIsDirectoryMask = 0x0010,
kFSNodeCopyProtectBit = 6,
kFSNodeCopyProtectMask = 0x0040,
kFSNodeForkOpenBit = 7,
kFSNodeForkOpenMask = 0x0080,
kFSNodeHardLinkBit = 8,
kFSNodeHardLinkMask = 0x00000100
};
Constants
kFSNodeLockedBitSet if the file or directory is locked.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeLockedMaskIndicates that the file or directory is locked.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeResOpenBitSet if the resource fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeResOpenMaskIndicates that the resource fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeDataOpenBitSet if the data fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeDataOpenMaskIndicates that the data fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsDirectoryBitSet if the object is a directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsDirectoryMaskIndicates that the object is a directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeCopyProtectBitSet of the file or directory is copy protected.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeCopyProtectMaskIndicates that the file or directory is copy protected.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeForkOpenBitSet if the file or directory has any open fork.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeForkOpenMaskIndicates that the file or directory has an open fork of any type.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeHardLinkBitAvailable in OS X v10.2 and later.
Declared in
Files.h.kFSNodeHardLinkMaskAvailable in OS X v10.2 and later.
Declared in
Files.h.
Catalog Information Sharing Flags
Indicate the status of a shared directory.
enum {
kFSNodeInSharedBit = 2,
kFSNodeInSharedMask = 0x0004,
kFSNodeIsMountedBit = 3,
kFSNodeIsMountedMask = 0x0008,
kFSNodeIsSharePointBit = 5,
kFSNodeIsSharePointMask = 0x0020
};
Constants
kFSNodeInSharedBitSet if a directory is within a share point.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeInSharedMaskIndicates that the directory is within a share point.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsMountedBitSet if a directory is a share point currently mounted by some user.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsMountedMaskIndicates that the directory is a share point currently mounted by some user.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsSharePointBitSet if a directory is a share point (an exported volume).
Available in OS X v10.0 and later.
Declared in
Files.h.kFSNodeIsSharePointMaskIndicates that the directory is a share point (an exported volume).
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
The FSCatalogInfo structure uses these constants in its sharingFlags field.
Catalog Search Bits
Indicate the criteria for a catalog search.
enum {
fsSBPartialNameBit = 0,
fsSBFullNameBit = 1,
fsSBFlAttribBit = 2,
fsSBFlFndrInfoBit = 3,
fsSBFlLgLenBit = 5,
fsSBFlPyLenBit = 6,
fsSBFlRLgLenBit = 7,
fsSBFlRPyLenBit = 8,
fsSBFlCrDatBit = 9,
fsSBFlMdDatBit = 10,
fsSBFlBkDatBit = 11,
fsSBFlXFndrInfoBit = 12,
fsSBFlParIDBit = 13,
fsSBNegateBit = 14,
fsSBDrUsrWdsBit = 3,
fsSBDrNmFlsBit = 4,
fsSBDrCrDatBit = 9,
fsSBDrMdDatBit = 10,
fsSBDrBkDatBit = 11,
fsSBDrFndrInfoBit = 12,
fsSBDrParIDBit = 13
};
Constants
fsSBPartialNameBitIndicates a search by a substring of the name.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFullNameBitIndicates a search by the full name.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlAttribBitIndicates a search by the file or directory attributes.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlFndrInfoBitFor files only indicates a search by the file’s Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlLgLenBitFor files only; indicates a search by the logical length of the data fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlPyLenBitFor files only; indicates a search by the physical length of the data fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlRLgLenBitFor files only; indicates a search for the logical length of the resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlRPyLenBitFor files only; indicates a search by the physical length of the resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlCrDatBitFor files only indicates a search by the file’s creation date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlMdDatBitFor files only indicates a search by the date of the file’s last modification.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlBkDatBitFor files only indicates a search by the date of the file’s last backup.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlXFndrInfoBitFor files only indicates a search by the file’s extended Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlParIDBitFor files only indicates a search by the file’s parent ID.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBNegateBitIndicates a search for all non-matches. That is, if a file or directory matches one of the other specified criteria, it is not returned; if it does not match any of the specified criteria, it is returned.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrUsrWdsBitFor directories only indicates a search by the directory’s Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrNmFlsBitFor directories only; indicates a search by the number of files in the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrCrDatBitFor directories only indicates a search by the directory’s creation date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrMdDatBitFor directories only indicates a search by the date of the directory’s last modification.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrBkDatBitFor directories only indicates a search by the date of the directory’s last backup.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrFndrInfoBitFor directories only indicates a search by the directory’s additional Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrParIDBitFor directories only indicates a search by the directory’s parent ID.
Available in OS X v10.0 and later.
Declared in
Files.h.
Catalog Search Constants
Specify the which catalog information fields to use as search criteria.
enum {
fsSBNodeID = 0x00008000,
fsSBAttributeModDate = 0x00010000,
fsSBAccessDate = 0x00020000,
fsSBPermissions = 0x00040000,
fsSBNodeIDBit = 15,
fsSBAttributeModDateBit = 16,
fsSBAccessDateBit = 17,
fsSBPermissionsBit = 18
};
Constants
fsSBNodeIDSearch by a range of catalog node ID.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBAttributeModDateSearch by a range of attribute (fork) modification date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBAccessDateSearch by a range of access date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBPermissionsSearch by a value or mask of permissions.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBNodeIDBitAvailable in OS X v10.0 and later.
Declared in
Files.h.fsSBAttributeModDateBitAvailable in OS X v10.0 and later.
Declared in
Files.h.fsSBAccessDateBitAvailable in OS X v10.0 and later.
Declared in
Files.h.fsSBPermissionsBitAvailable in OS X v10.0 and later.
Declared in
Files.h.
Catalog Search Masks
Specify the criteria for a catalog search.
enum {
fsSBPartialName = 1,
fsSBFullName = 2,
fsSBFlAttrib = 4,
fsSBFlFndrInfo = 8,
fsSBFlLgLen = 32,
fsSBFlPyLen = 64,
fsSBFlRLgLen = 128,
fsSBFlRPyLen = 256,
fsSBFlCrDat = 512,
fsSBFlMdDat = 1024,
fsSBFlBkDat = 2048,
fsSBFlXFndrInfo = 4096,
fsSBFlParID = 8192,
fsSBNegate = 16384,
fsSBDrUsrWds = 8,
fsSBDrNmFls = 16,
fsSBDrCrDat = 512,
fsSBDrMdDat = 1024,
fsSBDrBkDat = 2048,
fsSBDrFndrInfo = 4096,
fsSBDrParID = 8192
};
Constants
fsSBPartialNameSearch by a substring of the name.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFullNameSearch by the full name.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlAttribSearch by the file or directory attributes. You can use the attributes to specify that you are searching for a directory, or for a file or directory that is locked by software.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlFndrInfoFor files only search by the file’s Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlLgLenFor files only; search by the logical length of the data fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlPyLenFor files only; search by the physical length of the data fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlRLgLenFor files only; search for the logical length of the resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlRPyLenFor files only; search by the physical length of the resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlCrDatFor files only search by the file’s creation date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlMdDatFor files only search by the date of the file’s last modification.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlBkDatFor files only search by the date of the file’s last backup.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlXFndrInfoFor files only search by the file’s extended Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBFlParIDFor files only search by the file’s parent ID.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBNegateSearch for all non-matches. That is, if a file or directory matches one of the other specified criteria, it is not returned; if it does not match any of the specified criteria, it is returned.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrUsrWdsFor directories only search by the directory’s Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrNmFlsFor directories only; search by the number of files in the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrCrDatFor directories only search by the directory’s creation date.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrMdDatFor directories only search by the date of the directory’s last modification.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrBkDatFor directories only search by the date of the directory’s last backup.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrFndrInfoFor directories only search by the directory’s additional Finder info.
Available in OS X v10.0 and later.
Declared in
Files.h.fsSBDrParIDFor directories only search by the directory’s parent ID.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
Use these constants in the ioSearchBits field of the PBCatSearchSync and PBCatSearchAsync functions to specify the criteria for your search.
Extended AFP Volume Mounting Information Flag
Specifies a flag used in the extendedFlags field of the AFPXVolMountInfo structure.
enum {
kAFPExtendedFlagsAlternateAddressMask = 1
};
Constants
kAFPExtendedFlagsAlternateAddressMaskIndicates that the
alternateAddressOffsetfield in theAFPXVolMountInforecord is used.Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
See the AFPXVolMountInfo structure for more information.
Extended Volume Attributes
Describe a volume’s extended attributes.
enum {
bIsEjectable = 0,
bSupportsHFSPlusAPIs = 1,
bSupportsFSCatalogSearch = 2,
bSupportsFSExchangeObjects = 3,
bSupports2TBFiles = 4,
bSupportsLongNames = 5,
bSupportsMultiScriptNames = 6,
bSupportsNamedForks = 7,
bSupportsSubtreeIterators = 8,
bL2PCanMapFileBlocks = 9,
bParentModDateChanges = 10,
bAncestorModDateChanges = 11,
bSupportsSymbolicLinks = 13,
bIsAutoMounted = 14,
bAllowCDiDataHandler = 17,
bSupportsExclusiveLocks = 18,
bSupportsJournaling = 19,
bNoVolumeSizes = 20,
bIsOnInternalBus = 21,
bIsCaseSensitive = 22,
bIsCasePreserving = 23,
bDoNotDisplay = 24,
bIsRemovable = 25,
bNoRootTimes = 26,
bIsOnExternalBus = 27,
bSupportsExtendedFileSecurity = 28
};
Constants
bIsEjectableThe volume is in an ejectable disk drive .
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsHFSPlusAPIsThe volume supports the HFS Plus APIs directly, i.e., the File Manager does not emulate them.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsFSCatalogSearchThe volume supports the
FSCatalogSearchoperation.Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsFSExchangeObjectsThe volume supports the
FSExchangeObjectsfunction.Available in OS X v10.0 and later.
Declared in
Files.h.bSupports2TBFilesThe volume supports 2 terabyte files.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsLongNamesThe volume supports file, directory, and volume names longer than 31 characters.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsMultiScriptNamesThe volume supports file, directory, and volume names with characters from multiple script systems.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsNamedForksThe volume supports named forks other than the data and resource forks.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsSubtreeIteratorsThe volume supports recursive iterators, not at the volume root.
Available in OS X v10.0 and later.
Declared in
Files.h.bL2PCanMapFileBlocksThe volume supports the
Lg2PhysSPI correctly.Available in OS X v10.0 and later.
Declared in
Files.h.bParentModDateChangesOn this volume, changing a file or folder causes its parent's modification date to change.
Available in OS X v10.0 and later.
Declared in
Files.h.bAncestorModDateChangesOn this volume, changing a file or folder causes all ancestor modification dates to change.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsSymbolicLinksThe volume supports the creation and use of symbolic links (OS X only).
Available in OS X v10.0 and later.
Declared in
Files.h.bIsAutoMountedThe volume was mounted automatically (OS X only).
Available in OS X v10.0 and later.
Declared in
Files.h.bAllowCDiDataHandlerQuickTime's CDi data handler is allowed to examine the volume.
Available in OS X v10.1 and later.
Declared in
Files.h.bSupportsExclusiveLocksThe volume supports exclusive access to files opened for writing.
Available in OS X v10.2 and later.
Declared in
Files.h.bSupportsJournalingThe volume supports journaling. This does not indicate whether journaling is currently enabled on the volume.
Available in OS X v10.3 and later.
Declared in
Files.h.bNoVolumeSizesThe volume is unable to report volume size or free space.
Available in OS X v10.3 and later.
Declared in
Files.h.bIsOnInternalBusThe device is on an internal bus. See note below.
Available in OS X v10.4 and later.
Declared in
Files.h.bIsCaseSensitiveThe volume is case-sensitive.
Available in OS X v10.3 and later.
Declared in
Files.h.bIsCasePreservingThe volume is preserves case.
Available in OS X v10.3 and later.
Declared in
Files.h.bDoNotDisplayThe volume should not be displayed in the user interface.
Available in OS X v10.3 and later.
Declared in
Files.h.bIsRemovableThe device is removable according to IOKit.
Available in OS X v10.4 and later.
Declared in
Files.h.bNoRootTimesThe volume does not set reliable times for its root directory.
Available in OS X v10.4 and later.
Declared in
Files.h.bIsOnExternalBusThe device is on an external bus. See note below.
Available in OS X v10.4 and later.
Declared in
Files.h.bSupportsExtendedFileSecurityThe volume supports FSFileSecurity objects.
Available in OS X v10.4 and later.
Declared in
Files.h.
Discussion
The GetVolParmsInfoBuffer structure uses these constants in its vMExtendedAttributes field.
FCB Flags
Specify flags that describe the state of a file.
enum {
kioFCBWriteBit = 8,
kioFCBWriteMask = 0x0100,
kioFCBResourceBit = 9,
kioFCBResourceMask = 0x0200,
kioFCBWriteLockedBit = 10,
kioFCBWriteLockedMask = 0x0400,
kioFCBLargeFileBit = 11,
kioFCBLargeFileMask = 0x0800,
kioFCBSharedWriteBit = 12,
kioFCBSharedWriteMask = 0x1000,
kioFCBFileLockedBit = 13,
kioFCBFileLockedMask = 0x2000,
kioFCBOwnClumpBit = 14,
kioFCBOwnClumpMask = 0x4000,
kioFCBModifiedBit = 15,
kioFCBModifiedMask = 0x8000
};
Constants
kioFCBWriteBitSet if data can be written to this file.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBWriteMaskTests if data can be written to this file.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBResourceBitSet if this FCB describes a resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBResourceMaskTests if this FCB describes a resource fork.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBWriteLockedBitSet if this file has a locked byte range.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBWriteLockedMaskTests if this file has a locked byte range.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBLargeFileBitSet if this file may grow beyond 2GB and the cache uses file blocks, not bytes.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBLargeFileMaskTests if this file may grow beyond 2GB and the cache uses file blocks, not bytes.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBSharedWriteBitSet if this file has shared write permissions.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBSharedWriteMaskTests if this file has shared write permissions.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBFileLockedBitSet if this file is locked (write-protected).
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBFileLockedMaskTests if this file is locked (write-protected).
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBOwnClumpBitSet if this file’s clump size is specified in the FCB.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBOwnClumpMaskTests if this file’s clump size is specified in the FCB.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBModifiedBitSet if this file has changed since it was last flushed.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFCBModifiedMaskTests if this file has changed since it was last flushed.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioFCBFlags field of the FCBPBRec returned by the functions PBGetFCBInfoSync and PBGetFCBInfoAsync .
File Access Permission Constants
Specify the type of read and write access to a file or fork.
enum {
fsCurPerm = 0x00,
fsRdPerm = 0x01,
fsWrPerm = 0x02,
fsRdWrPerm = 0x03,
fsRdWrShPerm = 0x04,
fsRdDenyPerm = 0x10,
fsWrDenyPerm = 0x20
};
Constants
fsCurPermRequests whatever permissions are currently allowed. If write access in unavailable (because the file is locked or the file is already open with write permission), then read permission is granted. Otherwise read/write permission is granted.
Available in OS X v10.0 and later.
Declared in
Files.h.fsRdPermRequests permission to read the file.
Available in OS X v10.0 and later.
Declared in
Files.h.fsWrPermRequests permission to write to the file. If write permission is granted, no other access paths are granted write permission. Note, however, that the File Manager does not support write-only access to a file. Thus,
fsWrPermis synonymous withfsRdWrPerm.Available in OS X v10.0 and later.
Declared in
Files.h.fsRdWrPermRequests exclusive read and write permission. If exclusive read/ write permission is granted, no other users are granted permission to write to the file. Other users may, however, be granted permission to read the file.
Available in OS X v10.0 and later.
Declared in
Files.h.fsRdWrShPermRequests shared read and write permission. Shared read and write permission allows multiple access paths for reading and writing. This is safe only if there is some way of locking portions of the file before writing to them. On volumes that support range locking, you can use the functions
PBLockRangeSyncandPBUnlockRangeSyncto lock and unlock ranges of bytes within a file. Applications running in OS X version 10.4 or later should use the functionsFSLockRangeandFSUnlockRangefor this purpose.Available in OS X v10.0 and later.
Declared in
Files.h.fsRdDenyPermRequests that any other paths be prevented from having read access. A path cannot be opened if you request read permission (with the
fsRdPermconstant) but some other path has requested deny-read access. Similarly, the path cannot be opened if you request deny-read permission, but some other path already has read access. This constant is only supported on volumes which return thebHasOpenDenyattribute when you callFSGetVolumeParms.Available in OS X v10.0 and later.
Declared in
Files.h.fsWrDenyPermRequests that any other paths be prevented from having write access. A path cannot be opened if you request write permission (with the
fsWrPermconstant) but some other path has requested deny-write access. Similarly, the path cannot be opened if you request deny-write permission, but some other path already has write access. This constant is only supported on volumes which return thebHasOpenDenyattribute when you callFSGetVolumeParms.Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
Use these constants to request a type of access to a file or fork, or to deny a type of access to a file or fork to other paths that may request access.
Note that it is possible, in Mac OS 8 and 9, to open a file residing on read-only media with write access. In OS X, however, you cannot open a file with write access on read-only media; the attempt to open the file fails with a wrPermErr error.
File and Folder Access Privilege Constants
Specify access privileges for files and directories in the ioACAccess field of the AccessParam data type.
enum {
kioACAccessOwnerBit = 31,
kioACAccessOwnerMask = 0x80000000,
kioACAccessBlankAccessBit = 28,
kioACAccessBlankAccessMask = 0x10000000,
kioACAccessUserWriteBit = 26,
kioACAccessUserWriteMask = 0x04000000,
kioACAccessUserReadBit = 25,
kioACAccessUserReadMask = 0x02000000,
kioACAccessUserSearchBit = 24,
kioACAccessUserSearchMask = 0x01000000,
kioACAccessEveryoneWriteBit = 18,
kioACAccessEveryoneWriteMask = 0x00040000,
kioACAccessEveryoneReadBit = 17,
kioACAccessEveryoneReadMask = 0x00020000,
kioACAccessEveryoneSearchBit = 16,
kioACAccessEveryoneSearchMask = 0x00010000,
kioACAccessGroupWriteBit = 10,
kioACAccessGroupWriteMask = 0x00000400,
kioACAccessGroupReadBit = 9,
kioACAccessGroupReadMask = 0x00000200,
kioACAccessGroupSearchBit = 8,
kioACAccessGroupSearchMask = 0x00000100,
kioACAccessOwnerWriteBit = 2,
kioACAccessOwnerWriteMask = 0x00000004,
kioACAccessOwnerReadBit = 1,
kioACAccessOwnerReadMask = 0x00000002,
kioACAccessOwnerSearchBit = 0,
kioACAccessOwnerSearchMask = 0x00000001,
kfullPrivileges = 0x00070007,
kownerPrivileges = 0x00000007
};
Constants
kioACAccessOwnerBitIndicates that the user is the owner of the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerMaskThe user is the owner of the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessBlankAccessBitIndicates that the directory has blank access privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessBlankAccessMaskThe directory has blank access privileges. A directory with blank access privileges set ignores the other access privilege bits and uses the access privilege bits of its parent directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserWriteBitIndicates that the user has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserWriteMaskThe user has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserReadBitIndicates that the user has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserReadMaskThe user has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserSearchBitIndicates that the user has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessUserSearchMaskThe user has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneWriteBitIndicates that everyone has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneWriteMaskEveryone has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneReadBitIndicates that everyone has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneReadMaskEveryone has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneSearchBitIndicates that everyone has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessEveryoneSearchMaskEveryone has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupWriteBitIndicates that the group has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupWriteMaskThe group has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupReadBitIndicates that the group has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupReadMaskThe group has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupSearchBitIndicates that the group has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessGroupSearchMaskThe group has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerWriteBitIndicates that the owner has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerWriteMaskThe owner has write privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerReadBitIndicates that the owner has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerReadMaskThe owner has read privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerSearchBitIndicates that the owner has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACAccessOwnerSearchMaskThe owner has search privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kfullPrivilegesIndicates that everyone, including the owner, have all privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kownerPrivilegesIndicates that only the owner has all privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
See AccessParam.
File Attribute Constants
Define file and directory attributes returned by the PBGetCatInfoSync and PBGetCatInfoAsync functions.
enum {
kioFlAttribLockedBit = 0,
kioFlAttribLockedMask = 0x01,
kioFlAttribResOpenBit = 2,
kioFlAttribResOpenMask = 0x04,
kioFlAttribDataOpenBit = 3,
kioFlAttribDataOpenMask = 0x08,
kioFlAttribDirBit = 4,
kioFlAttribDirMask = 0x10,
ioDirFlg = 4,
ioDirMask = 0x10,
kioFlAttribCopyProtBit = 6,
kioFlAttribCopyProtMask = 0x40,
kioFlAttribFileOpenBit = 7,
kioFlAttribFileOpenMask = 0x80,
kioFlAttribInSharedBit = 2,
kioFlAttribInSharedMask = 0x04,
kioFlAttribMountedBit = 3,
kioFlAttribMountedMask = 0x08,
kioFlAttribSharePointBit = 5,
kioFlAttribSharePointMask = 0x20
};
Constants
kioFlAttribLockedBitIndicates that the file or directory is locked. Use the functions
PBHSetFLockSyncandPBHSetFLockAsyncto lock a file or directory. Use the functionsPBHRstFLockSyncandPBHRstFLockAsyncto unlock a file or directory.Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribLockedMaskTests if the file or directory is locked.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribResOpenBitIndicates that the resource fork is open. On OS X, this bit is not set if the resource fork of the file has been opened by a process other than the process making the call to
PBHGetCatInfoorPBHGetFInfo.Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribResOpenMaskTests if the resource fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribDataOpenBitIndicates that the data fork is open. On OS X, this bit is not set if the data fork of the file has been opened by a process other than the process making the call to
PBHGetCatInfoorPBHGetFInfo.Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribDataOpenMaskTests if the data fork is open.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribDirBitIndicates that this is a directory, not a file. This bit is always clear for files, and is always set for directories.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribDirMaskTests if this is a directory.
Available in OS X v10.0 and later.
Declared in
Files.h.ioDirFlgIndicates that this is a directory; this is the old name of the
kioFlAttribDirBit.Available in OS X v10.0 and later.
Declared in
Files.h.ioDirMaskTests if this is a directory; this is the old name of the
kioFlAttribDirMask.Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribCopyProtBitIndicates that the file is “copy-protected” by the AppleShare server.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribCopyProtMaskTests if the file is “copy-protected” by the AppleShare server.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribFileOpenBitIndicates that the file is open. This bit is set if either the data or the resource fork are open. On OS X, this bit is not set if the file has been opened by a process other than the process making the call to
PBHGetCatInfoorPBHGetFInfo.Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribFileOpenMaskTests if the file is open. The file is open if either the data or the resource fork are open.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribInSharedBitIndicates that the directory is within a shared area of the directory hierarchy.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribInSharedMaskTests if the directory is within a shared area of the directory hierarchy.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribMountedBitIndicates that the directory is a share point that is mounted by a user.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribMountedMaskTests if the directory is a share point that is mounted by a user.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribSharePointBitIndicates that the directory is a share point.
Available in OS X v10.0 and later.
Declared in
Files.h.kioFlAttribSharePointMaskTests if the directory is a share point.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioFlAttrib fields of the HFileInfo and DirInfo structures returned by the functions PBGetCatInfoSync and PBGetCatInfoAsync .
File Operation Options
Flags you can use to specify how to perform a file operation.
enum {
kFSFileOperationDefaultOptions = 0,
kFSFileOperationOverwrite = 0x01,
kFSFileOperationSkipSourcePermissionErrors = 0x02,
kFSFileOperationDoNotMoveAcrossVolumes = 0x04,
kFSFileOperationSkipPreflight = 0x08
};
Constants
kFSFileOperationDefaultOptionsUse the following default options:
If the destination directory contains an object with the same name as a source object, abort the operation.
If a source object cannot be read, abort the operation.
If asked to move an object across volume boundaries, perform the operation.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSFileOperationOverwriteIf the destination directory contains an object with the same name as a source object, overwrite the destination object.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSFileOperationSkipSourcePermissionErrorsIf a source object cannot be read, skip the object and continue the operation.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSFileOperationDoNotMoveAcrossVolumesIf asked to move an object across volume boundaries, abort the operation.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSFileOperationSkipPreflightSkip the preflight stage for a directory move or copy operation. This option limits the status information that can be returned during the operation.
Available in OS X v10.4 and later.
Declared in
Files.h.
Discussion
These flags may be passed to any of the functions that initiate a file operation. For more information, see “Copying and Moving Objects Using Asynchronous High-Level File Operations.”
File Operation Stages
Constants used by the File Manager to indicate the current stage of an asynchronous file operation.
typedef UInt32 FSFileOperationStage;
enum {
kFSOperationStageUndefined = 0,
kFSOperationStagePreflighting = 1,
kFSOperationStageRunning = 2,
kFSOperationStageComplete = 3
};
Constants
kFSOperationStageUndefinedThe File Manager has not started the file operation.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSOperationStagePreflightingThe File Manager is performing tasks such as calculating the sizes and number of objects in the operation, and checking to make sure there is enough space on the destination volume to complete the operation.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSOperationStageRunningThe File Manager is copying or moving the file or directory.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSOperationStageCompleteThe file operation is complete.
Available in OS X v10.4 and later.
Declared in
Files.h.
Discussion
These constants are passed back to your file operation status callback function. For more information, see “File Operation Callbacks.” You can also get the current stage of a file operation by calling a status accessor function such as FSFileOperationCopyStatus.
File Operation Status Dictionary Keys
Keys used to determine the status of a file operation as reported in a status dictionary.
const CFStringRef kFSOperationTotalBytesKey; const CFStringRef kFSOperationBytesCompleteKey; const CFStringRef kFSOperationBytesRemainingKey; const CFStringRef kFSOperationTotalObjectsKey; const CFStringRef kFSOperationObjectsCompleteKey; const CFStringRef kFSOperationObjectsRemainingKey; const CFStringRef kFSOperationTotalUserVisibleObjectsKey; const CFStringRef kFSOperationUserVisibleObjectsCompleteKey; const CFStringRef kFSOperationUserVisibleObjectsRemainingKey; const CFStringRef kFSOperationThroughputKey;
Constants
kFSOperationTotalBytesKeyThe value for this key is a CFNumber that represents the total number of bytes that will be moved or copied by this file operation. This value is not available for a directory operation if the
kFSFileOperationSkipPreflightoption flag is specified.Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationBytesCompleteKeyThe value for this key is a CFNumber that represents the total number of bytes that have already been moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationBytesRemainingKeyThe value for this key is a CFNumber that represents the total number of bytes that remain to be moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationTotalObjectsKeyThe value for this key is a CFNumber that represents the total number of objects that will be moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationObjectsCompleteKeyThe value for this key is a CFNumber that represents the total number of objects that have already been moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationObjectsRemainingKeyThe value for this key is a CFNumber that represents the total number of objects that remain to be moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationTotalUserVisibleObjectsKeyThe value for this key is a CFNumber that represents the total number of user-visible objects that will be moved or copied by this file operation. In general, an object is user-visible if it is displayed in a Finder window. For example, a package is counted as a single user-visible object even though it typically contains many other objects.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationUserVisibleObjectsCompleteKeyThe value for this key is a CFNumber that represents the total number of user-visible objects that have already been moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationUserVisibleObjectsRemainingKeyThe value for this key is a CFNumber that represents the total number of user-visible objects that remain to be moved or copied by this file operation.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.kFSOperationThroughputKeyThe value for this key is a CFNumber that represents the current throughput of this file operation in bytes per second.
Available in OS X v10.4 and later.
Deprecated in OS X v10.8.
Declared in
Files.h.
Discussion
The status dictionary for a file operation is passed back to your status callback function. For more information, see “File Operation Callbacks.” You can also get the status dictionary for a file operation by calling a status accessor function such as FSFileOperationCopyStatus.
FNMessage
typedef UInt32 FNMessage;
enum {
kFNDirectoryModifiedMessage = 1
};
Constants
kFNDirectoryModifiedMessageAvailable in OS X v10.0 and later.
Declared in
Files.h.
Foreign Privilege Model Constant
Identifies the A/UX privilege model.
enum {
fsUnixPriv = 1
};
Constants
fsUnixPrivRepresents a volume that supports the A/UX privilege model.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
Used in the vMForeignPrivID field of the GetVolParmsInfoBuffer.
Group ID Constant
enum {
knoGroup = 0
};
Constants
knoGroupAvailable in OS X v10.0 and later.
Declared in
Files.h.
Icon Size Constants
Specify the sizes of the desktop database icon types.
enum {
kLargeIconSize = 256,
kLarge4BitIconSize = 512,
kLarge8BitIconSize = 1024,
kSmallIconSize = 64,
kSmall4BitIconSize = 128,
kSmall8BitIconSize = 256
};
Constants
kLargeIconSizeLarge black-and-white icon with mask. Corresponding resource type: '
ICN#'.Available in OS X v10.0 and later.
Declared in
Files.h.kLarge4BitIconSizeLarge 4-bit color icon. Corresponding resource type: '
icl4’.Available in OS X v10.0 and later.
Declared in
Files.h.kLarge8BitIconSizeLarge 8-bit color icon. Corresponding resource type: '
icl8'.Available in OS X v10.0 and later.
Declared in
Files.h.kSmallIconSizeSmall black-and-white icon with mask. Corresponding resource type: '
ics#'.Available in OS X v10.0 and later.
Declared in
Files.h.kSmall4BitIconSizeSmall 4-bit color icon. Corresponding resource type: '
ics4'.Available in OS X v10.0 and later.
Declared in
Files.h.kSmall8BitIconSizeSmall 8-bit color icon. Corresponding resource type: '
ics8'.Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants indicate the amount of storage you should allocate for the icon data for each of the icon types specified by the “Icon Type Constants.” The desktop database functions which set or retrieve icon data–namely, PBDTAddIconSync , PBDTAddIconAsync , PBDTGetIconSync , PBDTGetIconAsync , PBDTGetIconInfoSync , and PBDTGetIconInfoAsync –expect a pointer to the the storage in the ioDTBuffer field of the DTPBRec parameter block and the appropriate constant in the ioDTReqCount field.
Icon Type Constants
Specify the icon types for the desktop database.
enum {
kLargeIcon = 1,
kLarge4BitIcon = 2,
kLarge8BitIcon = 3,
kSmallIcon = 4,
kSmall4BitIcon = 5,
kSmall8BitIcon = 6,
kicnsIconFamily = 239
};
Constants
kLargeIconLarge black-and-white icon with mask. Corresponding resource type: '
ICN#'.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kLarge4BitIconLarge 4-bit color icon. Corresponding resource type: '
icl4’.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kLarge8BitIconLarge 8-bit color icon. Corresponding resource type: '
icl8'.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kSmallIconSmall black-and-white icon with mask. Corresponding resource type: '
ics#'.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kSmall4BitIconSmall 4-bit color icon. Corresponding resource type: '
ics4'.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kSmall8BitIconSmall 8-bit color icon. Corresponding resource type: '
ics8'.Available in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.kicnsIconFamilyAvailable in OS X v10.0 and later.
Not available to 64-bit applications.
Declared in
Files.h.
Discussion
These constants are used in the ioIconType field of the DTPBRec parameter block.
Invalid Volume Reference Constant
Represents an invalid volume reference number.
enum {
kFSInvalidVolumeRefNum = 0
};
Constants
kFSInvalidVolumeRefNumInvalid volume reference number.
Available in OS X v10.0 and later.
Declared in
Files.h.
Iterator Flags
Indicate whether an iterator iterates over subtrees or just the immediate children of the container.
enum {
kFSIterateFlat = 0,
kFSIterateSubtree = 1,
kFSIterateDelete = 2,
kFSIterateReserved = 0xFFFFFFFC
};
typedef OptionBits FSIteratorFlags;
Constants
kFSIterateFlatIterate over the immediate children of the container only.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSIterateSubtreeIterate over the entire subtree rooted at the container.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSIterateDeleteAvailable in OS X v10.0 and later.
Declared in
Files.h.kFSIterateReservedAvailable in OS X v10.0 and later.
Declared in
Files.h.
kAsyncMountInProgress
enum {
kAsyncMountInProgress = 1,
kAsyncMountComplete = 2,
kAsyncUnmountInProgress = 3,
kAsyncUnmountComplete = 4,
kAsyncEjectInProgress = 5,
kAsyncEjectComplete = 6
};
Constants
kAsyncMountInProgressAvailable in OS X v10.2 and later.
Declared in
Files.h.kAsyncMountCompleteAvailable in OS X v10.2 and later.
Declared in
Files.h.kAsyncUnmountInProgressAvailable in OS X v10.2 and later.
Declared in
Files.h.kAsyncUnmountCompleteAvailable in OS X v10.2 and later.
Declared in
Files.h.kAsyncEjectInProgressAvailable in OS X v10.2 and later.
Declared in
Files.h.kAsyncEjectCompleteAvailable in OS X v10.2 and later.
Declared in
Files.h.
Notification Subscription Options
Options that can be specified at subscription time.
enum {
kFNNoImplicitAllSubscription = (1 << 0),
kFNNotifyInBackground = (1 << 1)
};
Constants
kFNNoImplicitAllSubscriptionSpecify this option if you do not want to receive notifications on this subscription when
FNNotifyAllis called. By default, any subscription is also implicitly a subscription to wildcard notifications.Available in OS X v10.1 and later.
Declared in
Files.h.kFNNotifyInBackgroundSpecify this option if you want to receive notifications on this subscription when your application is in background. By default, notifications will be coalesced and and delivered when your application becomes foreground.
Available in OS X v10.3 and later.
Declared in
Files.h.
kHFSCatalogNodeIDsReusedBit
enum {
kHFSCatalogNodeIDsReusedBit = 12,
kHFSCatalogNodeIDsReusedMask = 1 << kHFSCatalogNodeIDsReusedBit
};
Constants
kHFSCatalogNodeIDsReusedBitAvailable in OS X v10.0 and later.
Declared in
hfs_format.h.kHFSCatalogNodeIDsReusedMaskAvailable in OS X v10.0 and later.
Declared in
hfs_format.h.
Large Volume Constants
enum {
kWidePosOffsetBit = 8,
kUseWidePositioning = (1 << kWidePosOffsetBit),
kMaximumBlocksIn4GB = 0x007FFFFF
};
Constants
kWidePosOffsetBitAvailable in OS X v10.0 and later.
Declared in
Files.h.kUseWidePositioningAvailable in OS X v10.0 and later.
Declared in
Files.h.kMaximumBlocksIn4GBAvailable in OS X v10.0 and later.
Declared in
Files.h.
Mapping Code Constants
Specify the type of object to map or return.
enum {
kOwnerID2Name = 1,
kGroupID2Name = 2,
kOwnerName2ID = 3,
kGroupName2ID = 4,
kReturnNextUser = 1,
kReturnNextGroup = 2,
kReturnNextUG = 3
};
Constants
kOwnerID2NameMap a user ID to the user name. Used with the
PBHMapIDSyncorPBHMapIDAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.kGroupID2NameMap a group ID to the group name. Used with the
PBHMapIDSyncorPBHMapIDAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.kOwnerName2IDMap a user name to the user ID. Used with the
PBHMapNameSyncorPBHMapNameAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.kGroupName2IDMap a group name to the group ID. Used with the
PBHMapNameSyncorPBHMapNameAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.kReturnNextUserReturn the next user entry.
Available in OS X v10.0 and later.
Declared in
Files.h.kReturnNextGroupReturn the next group entry.
Available in OS X v10.0 and later.
Declared in
Files.h.kReturnNextUGReturn the next user or group entry.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioObjType field of the ObjParam parameter block. The first four constants are passed to the PBHMapIDSync , PBHMapIDAsync , PBHMapNameSync , and PBHMapNameAsync functions to specify the mapping to be performed. The last three constants are passed to the PBGetUGEntrySync or PBGetUGEntryAsync functions to specify the type of object to be returned.
Path Conversion Options
Specify how a pathname is converted to an FSRef structure by the function FSPathMakeRefWithOptions.
enum {
kFSPathMakeRefDefaultOptions = 0,
kFSPathMakeRefDoNotFollowLeafSymlink = 0x01
};
Constants
kFSPathMakeRefDefaultOptionsUse the default options.
Available in OS X v10.4 and later.
Declared in
Files.h.kFSPathMakeRefDoNotFollowLeafSymlinkWhen converting a path that refers to a symbolic link, do not follow the link. The new
FSRefshould refer to the link itself.Available in OS X v10.4 and later.
Declared in
Files.h.
Position Mode Constants
Together with an offset, specify a position within a fork.
enum {
fsAtMark = 0,
fsFromStart = 1,
fsFromLEOF = 2,
fsFromMark = 3
};
Constants
fsAtMarkThe starting point is the access path’s current position. The offset is ignored.
Available in OS X v10.0 and later.
Declared in
Files.h.fsFromStartThe starting point is offset bytes from the start of the fork. The offset must be non-negative.
Available in OS X v10.0 and later.
Declared in
Files.h.fsFromLEOFThe starting point is offset bytes from the logical end of the fork. The offset must not be positive.
Available in OS X v10.0 and later.
Declared in
Files.h.fsFromMarkThe starting point is offset bytes from the access path’s current position. The offset may be positive or negative.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioPosMode and positionMode fields and parameters of the HFS and HFS Plus file access functions. These functions include those for reading from and writing to files or forks, changing the current position within a file or fork, changing the size of a file or fork, and allocating space to a file or fork.
For the FSReadFork and FSWriteFork calls, you may also add either of the pleaseCacheMask or noCacheMask constants to hint whether the data should be cached or not. See “Cache Constants.”
Root Directory Constants
Specify the directory IDs of the root directory of a volume and its parent.
enum {
fsRtParID = 1,
fsRtDirID = 2
};
Constants
fsRtParIDRepresents the directory ID of the root directory’s parent directory. The root directory has no parent this constant is used when specifying the root directory to functions which require the parent directory ID to identify directories.
Available in OS X v10.0 and later.
Declared in
Files.h.fsRtDirIDRepresents the directory ID of the volume’s root directory.
Available in OS X v10.0 and later.
Declared in
Files.h.
User ID Constants
Specify basic user IDs for shared directories.
enum {
knoUser = 0,
kadministratorUser = 1
};
Constants
knoUserAvailable in OS X v10.0 and later.
Declared in
Files.h.kadministratorUserAvailable in OS X v10.0 and later.
Declared in
Files.h.
User Privileges Constants
Specify the user privileges for a directory on a remote volume.
enum {
kioACUserNoSeeFolderBit = 0,
kioACUserNoSeeFolderMask = 0x01,
kioACUserNoSeeFilesBit = 1,
kioACUserNoSeeFilesMask = 0x02,
kioACUserNoMakeChangesBit = 2,
kioACUserNoMakeChangesMask = 0x04,
kioACUserNotOwnerBit = 7,
kioACUserNotOwnerMask = 0x80
};
Constants
kioACUserNoSeeFolderBitSet if the user does not have “See Folders” privileges. Without “See Folders” privileges, the user cannot see other directories in the specified directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNoSeeFolderMaskTests if the user has “See Folders” privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNoSeeFilesBitSet if the user does not have “See Files” privileges. Without “See Files” privileges, the user cannot open documents or applications in the specified directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNoSeeFilesMaskTests if the user has “See Files” privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNoMakeChangesBitSet if the user does not have “Make Changes” privileges. Without “Make Changes” privileges, the user cannot create, modify, rename, or delete any file or directory within the specified directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNoMakeChangesMaskTests if the user has “Make Changes” privileges.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNotOwnerBitSet if the user is not the owner of the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.kioACUserNotOwnerMaskTests whether the user is the owner of the directory.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioACUser field of the HFileInfo and DirInfo structures returned by the PBGetCatInfoSync and PBGetCatInfoAsync functions.
Volume Attribute Constants
Bit position constants that specify volume attributes.
enum {
bLimitFCBs = 31,
bLocalWList = 30,
bNoMiniFndr = 29,
bNoVNEdit = 28,
bNoLclSync = 27,
bTrshOffLine = 26,
bNoSwitchTo = 25,
bNoDeskItems = 20,
bNoBootBlks = 19,
bAccessCntl = 18,
bNoSysDir = 17,
bHasExtFSVol = 16,
bHasOpenDeny = 15,
bHasCopyFile = 14,
bHasMoveRename = 13,
bHasDesktopMgr = 12,
bHasShortName = 11,
bHasFolderLock = 10,
bHasPersonalAccessPrivileges = 9,
bHasUserGroupList = 8,
bHasCatSearch = 7,
bHasFileIDs = 6,
bHasBTreeMgr = 5,
bHasBlankAccessPrivileges = 4,
bSupportsAsyncRequests = 3,
bSupportsTrashVolumeCache = 2
};
enum {
bHasDirectIO = 1
};
Constants
bLimitFCBsThe Finder limits the number of file control blocks used during copying to 8 instead of 16.
Available in OS X v10.0 and later.
Declared in
Files.h.bLocalWListThe Finder uses the returned shared volume handle for its local window list.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoMiniFndrReserved; always set to 1.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoVNEditThis volume’s name cannot be edited.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoLclSyncDon’t let the Finder change the modification date.
Available in OS X v10.0 and later.
Declared in
Files.h.bTrshOffLineAny time this volume goes offline, it is zoomed to the Trash and unmounted.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoSwitchToThe Finder will not switch launch to any application on this volume.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoDeskItemsDon’t place objects in this volume on the Finder desktop.
Available in OS X v10.0 and later.
Declared in
Files.h.bNoBootBlksThis volume is not a startup volume. The Startup menu item is disabled. Boot blocks are not copied during copy operations.
Available in OS X v10.0 and later.
Declared in
Files.h.bAccessCntlThis volume supports AppleTalk AFP access-control interfaces. The following functions are supported:
PBHGetLogInInfoSyncPBHGetLogInInfoAsyncPBHGetDirAccessSyncPBHGetDirAccessAsyncPBHSetDirAccessSyncPBHSetDirAccessAsyncPBHMapIDSyncPBHMapIDAsyncPBHMapNameSyncPBHMapNameAsync
Special folder icons are used. The Access Privileges menu command is enabled for disk and folder items. The
ioFlAttribfield of the parameter block passed to thePBGetCatInfoSyncandPBGetCatInfoSyncfunctions is assumed to be valid.Available in OS X v10.0 and later.
Declared in
Files.h.bNoSysDirThis volume doesn’t support a system directory. Do not switch launch to this volume.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasExtFSVolThis volume is an external file system volume.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasOpenDenyThis volume supports the
PBHOpenDenySync,PBHOpenDenyAsync,PBHOpenRFDenySyncandPBHOpenRFDenyAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.bHasCopyFileThis volume supports the
PBHCopyFileSyncandPBHCopyFileAsyncfunctions, which is used in copy and duplicate operations if both source and destination volumes have the same server address.Available in OS X v10.0 and later.
Declared in
Files.h.bHasMoveRenameThis volume supports the
PBHMoveRenameSyncandPBHMoveRenameAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.bHasDesktopMgrThis volume supports all of the desktop functions.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasShortNameThis volume supports AFP short names.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasFolderLockFolders on the volume can be locked, and so they cannot be deleted or renamed.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasPersonalAccessPrivilegesThis volume has local file sharing enabled.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasUserGroupListThis volume supports the Users and Groups file and thus the AFP privilege functions.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasCatSearchThis volume supports the
PBCatSearchSyncandPBCatSearchAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.bHasFileIDsThis volume supports the file ID functions, including the
PBExchangeFilesSyncandPBExchangeFilesAsyncfunctions.Available in OS X v10.0 and later.
Declared in
Files.h.bHasBTreeMgrReserved for internal use.
Available in OS X v10.0 and later.
Declared in
Files.h.bHasBlankAccessPrivilegesThis volume supports inherited access privileges for folders (blank access privileges).
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsAsyncRequestsThis volume correctly handles asynchronous requests at any time.
Available in OS X v10.0 and later.
Declared in
Files.h.bSupportsTrashVolumeCacheAvailable in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants correspond to bit positions in the vMAttrib field of the GetVolParmsInfoBuffer structure returned by the PBHGetVolParmsSync and PBHGetVolParmsAsync functions.
Volume Control Block Flags
Used in the vcbFlags field of a volume control block to specify information about a volume.
enum {
kVCBFlagsIdleFlushBit = 3,
kVCBFlagsIdleFlushMask = 0x0008,
kVCBFlagsHFSPlusAPIsBit = 4,
kVCBFlagsHFSPlusAPIsMask = 0x0010,
kVCBFlagsHardwareGoneBit = 5,
kVCBFlagsHardwareGoneMask = 0x0020,
kVCBFlagsVolumeDirtyBit = 15,
kVCBFlagsVolumeDirtyMask = 0x8000
};
Constants
kVCBFlagsIdleFlushBitIndicates that the volume should be flushed at idle time.
Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsIdleFlushMaskFlushes the volume at idle time.
Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsHFSPlusAPIsBitIndicates that the volume directly implements the HFS Plus APIs (rather than emulating them).
Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsHFSPlusAPIsMaskThe volume directly implements the HFS Plus APIs.
Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsHardwareGoneBitIndicates that the disk driver returned a
hardwareGoneErrin response to a read or write call.Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsHardwareGoneMaskTests if the disk driver returned a
hardwareGoneErrin response to a read or write call.Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsVolumeDirtyBitIndicates that the volume information has changed since the last time the volume was flushed.
Available in OS X v10.0 and later.
Declared in
Files.h.kVCBFlagsVolumeDirtyMaskThe volume has changed since the last time the volume was flushed.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
See VCB for a description of the volume control block.
Volume Information Attribute Constants
Define volume attributes returned by the functions PBHGetVInfoSync, PBHGetVInfoAsync, PBXGetVolInfoSync, and PBXGetVolInfoAsync.
enum {
kioVAtrbDefaultVolumeBit = 5,
kioVAtrbDefaultVolumeMask = 0x0020,
kioVAtrbFilesOpenBit = 6,
kioVAtrbFilesOpenMask = 0x0040,
kioVAtrbHardwareLockedBit = 7,
kioVAtrbHardwareLockedMask = 0x0080,
kioVAtrbSoftwareLockedBit = 15,
kioVAtrbSoftwareLockedMask = 0x8000
};
Constants
kioVAtrbDefaultVolumeBitIndicates that the volume is the default volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbDefaultVolumeMaskTests if the volume is the default volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbFilesOpenBitIndicates that there are open files or iterators.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbFilesOpenMaskTests if there are open files or iterators.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbHardwareLockedBitIndicates that the volume is locked by a hardware setting. On OS X, the File Manager only sets the software locked bit for CDs and other read-only media; it does not set the hardware locked bit.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbHardwareLockedMaskTests if the volume is locked by a hardware setting.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbSoftwareLockedBitIndicates that the volume is locked by software.
Available in OS X v10.0 and later.
Declared in
Files.h.kioVAtrbSoftwareLockedMaskTests if the volume is locked by software.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used in the ioVAtrb field of the HVolumeParam parameter block returned by the PBHGetVInfoSync and PBHGetVInfoAsync functions, and in the ioVAtrb field of the XVolumeParam parameter block returned by the PBXGetVolInfoSync and PBXGetVolInfoAsync functions.
Volume Information Bitmap Constants
Indicate what volume information to set or retrieve.
enum {
kFSVolInfoNone = 0x0000,
kFSVolInfoCreateDate = 0x0001,
kFSVolInfoModDate = 0x0002,
kFSVolInfoBackupDate = 0x0004,
kFSVolInfoCheckedDate = 0x0008,
kFSVolInfoFileCount = 0x0010,
kFSVolInfoDirCount = 0x0020,
kFSVolInfoSizes = 0x0040,
kFSVolInfoBlocks = 0x0080,
kFSVolInfoNextAlloc = 0x0100,
kFSVolInfoRsrcClump = 0x0200,
kFSVolInfoDataClump = 0x0400,
kFSVolInfoNextID = 0x0800,
kFSVolInfoFinderInfo = 0x1000,
kFSVolInfoFlags = 0x2000,
kFSVolInfoFSInfo = 0x4000,
kFSVolInfoDriveInfo = 0x8000,
kFSVolInfoGettableInfo = 0xFFFF,
kFSVolInfoSettableInfo = 0x3004
};
Constants
kFSVolInfoNoneNo volume information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoCreateDateRetrieve the creation date of the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoModDateRetrieve the date of the volume’s last modification.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoBackupDateRetrieve or set the date of the volume’s last backup.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoCheckedDateRetrieve the date that the volume was last checked for consistency.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoFileCountRetrieve the number of files on the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoDirCountRetrieve the number of directories on the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoSizesRetrieve the total number of bytes on the volume and the number of unused bytes on the volume (in the
totalBytesandfreeBytesfields).Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoBlocksRetrieve the block information: the block size, the number of total blocks on the volume, and the number of free blocks on the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoNextAllocRetrieve the address at which to start the next allocation.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoRsrcClumpRetrieve the resource fork clump size.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoDataClumpRetrieve the data fork clump size.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoNextIDRetrieve the next available catalog node ID.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoFinderInfoRetrieve or set the volume’s Finder information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoFlagsRetrieve or set the volume’s flags. See “Volume Information Flags” for more information on the volume’s flags.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoFSInfoRetrieve the filesystem ID and signature.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoDriveInfoRetrieve the drive information: the drive number and driver reference number.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoGettableInfoRetrieve all of the gettable information.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolInfoSettableInfoSet all of the settable information. Currently, this is the backup date, Finder information, and flags.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
These constants are used with the FSVolumeInfoBitmap data type to indicate what volume information to set or retrieve with the functions FSSetVolumeInfo and FSGetVolumeInfo , and their corresponding parameter block calls.
Volume Information Flags
Used by the FSVolumeInfo structure to specify characteristics of a volume.
enum {
kFSVolFlagDefaultVolumeBit = 5,
kFSVolFlagDefaultVolumeMask = 0x0020,
kFSVolFlagFilesOpenBit = 6,
kFSVolFlagFilesOpenMask = 0x0040,
kFSVolFlagHardwareLockedBit = 7,
kFSVolFlagHardwareLockedMask = 0x0080,
kFSVolFlagSoftwareLockedBit = 15,
kFSVolFlagSoftwareLockedMask = 0x8000
};
Constants
kFSVolFlagDefaultVolumeBitSet if the volume is the default volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagDefaultVolumeMaskIndicates that the volume is the default volume.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagFilesOpenBitSet if there are open files or iterators.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagFilesOpenMaskIndicates that there are open files or iterators.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagHardwareLockedBitSet if the volume is locked by a hardware setting. On OS X, the File Manager only sets the software locked bit for CDs and other read-only media; it does not set the hardware locked bit.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagHardwareLockedMaskIndicates that the volume is locked by a hardware setting.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagSoftwareLockedBitSet if the volume is locked by software.
Available in OS X v10.0 and later.
Declared in
Files.h.kFSVolFlagSoftwareLockedMaskIndicates that the volume is locked by software.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
See the flags field of the FSVolumeInfo structure.
Volume Mount Flags
Define flags used by the volume mounting information structures.
enum {
volMountNoLoginMsgFlagBit = 0,
volMountNoLoginMsgFlagMask = 0x0001,
volMountExtendedFlagsBit = 7,
volMountExtendedFlagsMask = 0x0080,
volMountInteractBit = 15,
volMountInteractMask = 0x8000,
volMountChangedBit = 14,
volMountChangedMask = 0x4000,
volMountFSReservedMask = 0x00FF,
volMountSysReservedMask = 0xFF00
};
Constants
volMountNoLoginMsgFlagBitIndicates that any log-in message or greeting dialog will be suppressed.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountNoLoginMsgFlagMaskTells the file system to suppress any log-in message or greeting dialog.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountExtendedFlagsBitIndicates that the mounting information is a
AFPXVolMountInforecord for AppleShare Client version 3.7 and later.Available in OS X v10.0 and later.
Declared in
Files.h.volMountExtendedFlagsMaskTells the file system that the mounting information is an
AFPXVolMountInforecord for AppleShare Client version 3.7 and later.Available in OS X v10.0 and later.
Declared in
Files.h.volMountInteractBitIndicates that it's safe for the file system to perform user interaction to mount the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountInteractMaskTells the file system that it’s safe to perform user interaction to mount the volume.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountChangedBitIndicates that the volume was mounted, but the volume mounting information record needs to be updated.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountChangedMaskTests if the volume mounting information record needs to be updated.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountFSReservedMaskReserved.
Available in OS X v10.0 and later.
Declared in
Files.h.volMountSysReservedMaskReserved.
Available in OS X v10.0 and later.
Declared in
Files.h.
Discussion
Bits 0-7 are defined by each file system for its own use; bits 8-15 are reserved for Apple system use. These constants are used in the flags fields of the AFPVolMountInfo, AFPXVolMountInfo , and VolumeMountInfoHeader structures.
Result Codes
The most common result codes returned by File Manager functions are listed below.
© 2001, 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-23)