2

I've been looking through some old Mac programming references and found quite a few sets of three APIs with naming patterns like these:

  • FSIterateForks
  • PBIterateForksSync
  • PBIterateForksAsync

I'm pretty sure the FS- is for "filesystem". But I can't seem to find what the PB- is for. Note that it always seems to be together with one of the suffixes -Sync or -Async.

I don't think it's for "PowerBook" or "Petabyte" or "pasteboard" in this case, though those all use the "pb" abbreviation in certain circumstances in the Apple world.

Could it stand for "Public Beta"? I think this was used for OSX before it was released? But it seems a bit odd to enshrine this in API names.

hippietrail
  • 15,848
  • 18
  • 99
  • 158

1 Answers1

2

Judging from the function signatures, it stands for “param block”:

extern OSErr  PBIterateForksSync(FSForkIOParam * paramBlock)  __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
extern void  PBIterateForksAsync(FSForkIOParam * paramBlock)  __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);

All of these PB functions take a parameter called paramBlock.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
  • Perfect! Thank you. So the Parameter Block aka HFS Parameter Block is (or was??) an important structure in the File Manager. It's discussed throughout [this PDF on Apple's developer site](https://developer.apple.com/library/archive/documentation/mac/pdf/Files/File_Manager.pdf): " The low-level routines generally provide the greatest control over the requested task; they are identified by the prefixes PB and PBH, indicating that they take the address of a parameter block as a parameter." – hippietrail Nov 01 '19 at 13:23