Mac OS 9
Files.h
Go to the documentation of this file.
1 
19 #ifndef __FILES__
20 #define __FILES__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MIXEDMODE__
27 #include <MixedMode.h>
28 #endif
29 
30 #ifndef __OSUTILS__
31 #include <OSUtils.h>
32 #endif
33 
34 #ifndef __TEXTCOMMON__
35 #include <TextCommon.h>
36 #endif
37 
38 #ifndef __UTCUTILS__
39 #include <UTCUtils.h>
40 #endif
41 
42 /* Finder constants were moved to Finder.© */
43 #ifndef __FINDER__
44 #include <Finder.h>
45 #endif
46 
47 #if PRAGMA_ONCE
48 #pragma once
49 #endif
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 #if PRAGMA_IMPORT
57 #pragma import on
58 #endif
59 
60 #if PRAGMA_STRUCT_ALIGN
61 #pragma options align = mac68k
62 #elif PRAGMA_STRUCT_PACKPUSH
63 #pragma pack(push, 2)
64 #elif PRAGMA_STRUCT_PACK
65 #pragma pack(2)
66 #endif
67 
68  // HFSUniStr255 is the Unicode equivalent of Str255
69  struct HFSUniStr255
70  {
71  UInt16 length; /* number of unicode characters */
72  UniChar unicode[255]; /* unicode characters */
73  };
74  typedef struct HFSUniStr255 HFSUniStr255;
76  enum
77  {
78  fsCurPerm = 0x00, /* open access permissions in ioPermssn */
79  fsRdPerm = 0x01,
80  fsWrPerm = 0x02,
81  fsRdWrPerm = 0x03,
82  fsRdWrShPerm = 0x04,
83  fsRdDenyPerm = 0x10, /* for use with OpenDeny and OpenRFDeny */
84  fsWrDenyPerm = 0x20 /* for use with OpenDeny and OpenRFDeny */
85  };
86 
87  enum
88  {
89  fsRtParID = 1,
90  fsRtDirID = 2
91  };
92 
93  enum
94  {
95  fsAtMark = 0, /* positioning modes in ioPosMode */
96  fsFromStart = 1,
97  fsFromLEOF = 2,
98  fsFromMark = 3
99  };
100 
101  enum
102  {
103  /* ioPosMode flags */
104  pleaseCacheBit = 4, /* please cache this request */
105  pleaseCacheMask = 0x0010,
106  noCacheBit = 5, /* please don't cache this request */
107  noCacheMask = 0x0020,
108  rdVerifyBit = 6, /* read verify mode */
109  rdVerifyMask = 0x0040,
110  rdVerify = 64, /* old name of rdVerifyMask */
111  forceReadBit = 6,
112  forceReadMask = 0x0040,
113  newLineBit = 7, /* newline mode */
114  newLineMask = 0x0080,
115  newLineCharMask = 0xFF00 /* newline character */
116  };
117 
118  enum
119  {
120  /* CatSearch Search bitmask Constants */
121  fsSBPartialName = 1,
122  fsSBFullName = 2,
123  fsSBFlAttrib = 4,
124  fsSBFlFndrInfo = 8,
125  fsSBFlLgLen = 32,
126  fsSBFlPyLen = 64,
127  fsSBFlRLgLen = 128,
128  fsSBFlRPyLen = 256,
129  fsSBFlCrDat = 512,
130  fsSBFlMdDat = 1024,
131  fsSBFlBkDat = 2048,
132  fsSBFlXFndrInfo = 4096,
133  fsSBFlParID = 8192,
134  fsSBNegate = 16384,
135  fsSBDrUsrWds = 8,
136  fsSBDrNmFls = 16,
137  fsSBDrCrDat = 512,
138  fsSBDrMdDat = 1024,
139  fsSBDrBkDat = 2048,
140  fsSBDrFndrInfo = 4096,
141  fsSBDrParID = 8192
142  };
143 
144  enum
145  {
146  /* CatSearch Search bit value Constants */
147  fsSBPartialNameBit = 0, /*ioFileName points to a substring*/
148  fsSBFullNameBit = 1, /*ioFileName points to a match string*/
149  fsSBFlAttribBit = 2, /*search includes file attributes*/
150  fsSBFlFndrInfoBit = 3, /*search includes finder info*/
151  fsSBFlLgLenBit = 5, /*search includes data logical length*/
152  fsSBFlPyLenBit = 6, /*search includes data physical length*/
153  fsSBFlRLgLenBit = 7, /*search includes resource logical length*/
154  fsSBFlRPyLenBit = 8, /*search includes resource physical length*/
155  fsSBFlCrDatBit = 9, /*search includes create date*/
156  fsSBFlMdDatBit = 10, /*search includes modification date*/
157  fsSBFlBkDatBit = 11, /*search includes backup date*/
158  fsSBFlXFndrInfoBit = 12, /*search includes extended finder info*/
159  fsSBFlParIDBit = 13, /*search includes file's parent ID*/
160  fsSBNegateBit = 14, /*return all non-matches*/
161  fsSBDrUsrWdsBit = 3, /*search includes directory finder info*/
162  fsSBDrNmFlsBit = 4, /*search includes directory valence*/
163  fsSBDrCrDatBit = 9, /*directory-named version of fsSBFlCrDatBit*/
164  fsSBDrMdDatBit = 10, /*directory-named version of fsSBFlMdDatBit*/
165  fsSBDrBkDatBit = 11, /*directory-named version of fsSBFlBkDatBit*/
166  fsSBDrFndrInfoBit = 12, /*directory-named version of fsSBFlXFndrInfoBit*/
167  fsSBDrParIDBit = 13 /*directory-named version of fsSBFlParIDBit*/
168  };
169 
170  enum
171  {
172  /* vMAttrib (GetVolParms) bit position constants */
173  bLimitFCBs = 31,
174  bLocalWList = 30,
175  bNoMiniFndr = 29,
176  bNoVNEdit = 28,
177  bNoLclSync = 27,
178  bTrshOffLine = 26,
179  bNoSwitchTo = 25,
180  bDontShareIt = 21, /* this volume should not be shared by Macintosh File
181  Sharing (see Technical Note NW 29) */
182  bNoDeskItems = 20,
183  bNoBootBlks = 19,
184  bAccessCntl = 18,
185  bNoSysDir = 17,
186  bHasExtFSVol = 16,
187  bHasOpenDeny = 15,
188  bHasCopyFile = 14,
189  bHasMoveRename = 13,
190  bHasDesktopMgr = 12,
191  bHasShortName = 11,
192  bHasFolderLock = 10,
193  bHasPersonalAccessPrivileges = 9,
194  bHasUserGroupList = 8,
195  bHasCatSearch = 7,
196  bHasFileIDs = 6,
197  bHasBTreeMgr = 5,
198  bHasBlankAccessPrivileges = 4,
199  bSupportsAsyncRequests = 3, /* asynchronous requests to this volume are
200  handled correctly at any time*/
201  bSupportsTrashVolumeCache = 2
202  };
203 
204  enum
205  {
206  /* vMExtendedAttributes (GetVolParms) bit position constants */
207  bIsEjectable = 0, /* volume is in an ejectable disk drive */
208  bSupportsHFSPlusAPIs = 1, /* volume supports HFS Plus APIs directly (not
209  through compatibility layer) */
210  bSupportsFSCatalogSearch = 2, /* volume supports FSCatalogSearch */
211  bSupportsFSExchangeObjects = 3, /* volume supports FSExchangeObjects */
212  bSupports2TBFiles = 4, /* volume supports supports 2 terabyte files */
213  bSupportsLongNames = 5, /* volume supports file/directory/volume names longer
214  than 31 characters */
215  bSupportsMultiScriptNames =
216  6, /* volume supports file/directory/volume names with characters from
217  multiple script systems */
218  bSupportsNamedForks =
219  7, /* volume supports forks beyond the data and resource forks */
220  bSupportsSubtreeIterators =
221  8, /* volume supports recursive iterators not at the volume root */
222  bL2PCanMapFileBlocks = 9 /* volume supports Lg2Phys SPI correctly */
223  };
224 
225  enum
226  {
227  /* vMExtendedAttributes (GetVolParms) bit position constants */
228  bParentModDateChanges =
229  10, /* Changing a file or folder causes its parent's mod date to change */
230  bAncestorModDateChanges =
231  11 /* Changing a file or folder causes all ancestor mod dates to change */
232  };
233 
234  enum
235  {
236  /* vMExtendedAttributes (GetVolParms) bit position constants */
237  bSupportsSymbolicLinks = 13, /* volume supports the creation and use of
238  symbolic links (Mac OS X only) */
239  bIsAutoMounted = 14, /* volume was mounted automatically (Mac OS X only) */
240  bAllowCDiDataHandler =
241  17 /* allow QuickTime's CDi data handler to examine this volume */
242  };
243 
244  enum
245  {
246  /* Desktop Database, ffsGetIconMessage and fsmGetFSIconMessage icon type and
247  size Constants */
248  kLargeIcon = 1,
249  kLarge4BitIcon = 2,
250  kLarge8BitIcon = 3,
251  kSmallIcon = 4,
252  kSmall4BitIcon = 5,
253  kSmall8BitIcon = 6,
254  kicnsIconFamily =
255  239 /* Note: The 'icns' icon family record is variable sized. */
256  };
257 
258  enum
259  {
260  kLargeIconSize = 256,
261  kLarge4BitIconSize = 512,
262  kLarge8BitIconSize = 1024,
263  kSmallIconSize = 64,
264  kSmall4BitIconSize = 128,
265  kSmall8BitIconSize = 256
266  };
267 
268  enum
269  {
270  /* Large Volume Constants */
271  kWidePosOffsetBit = 8,
272  kUseWidePositioning = (1 << kWidePosOffsetBit),
273  kMaximumBlocksIn4GB = 0x007FFFFF
274  };
275 
276  enum
277  {
278  /* Foreign Privilege Model Identifiers */
279  fsUnixPriv = 1
280  };
281 
282  enum
283  {
284  /* Authentication Constants */
285  kNoUserAuthentication = 1,
286  kPassword = 2,
287  kEncryptPassword = 3,
288  kTwoWayEncryptPassword = 6
289  };
290 
291  /* mapping codes (ioObjType) for MapName & MapID */
292  enum
293  {
294  kOwnerID2Name = 1,
295  kGroupID2Name = 2,
296  kOwnerName2ID = 3,
297  kGroupName2ID =
298  4, /* types of oj object to be returned (ioObjType) for _GetUGEntry */
299  kReturnNextUser = 1,
300  kReturnNextGroup = 2,
301  kReturnNextUG = 3
302  };
303 
304  /* vcbFlags bits */
305  enum
306  {
307  kVCBFlagsIdleFlushBit = 3, /* Set if volume should be flushed at idle time */
308  kVCBFlagsIdleFlushMask = 0x0008,
309  kVCBFlagsHFSPlusAPIsBit =
310  4, /* Set if volume implements HFS Plus APIs itself (not via emulation) */
311  kVCBFlagsHFSPlusAPIsMask = 0x0010,
312  kVCBFlagsHardwareGoneBit =
313  5, /* Set if disk driver returned a hardwareGoneErr to Read or Write */
314  kVCBFlagsHardwareGoneMask = 0x0020,
315  kVCBFlagsVolumeDirtyBit =
316  15, /* Set if volume information has changed since the last FlushVol */
317  kVCBFlagsVolumeDirtyMask = 0x8000
318  };
319 
320  /* ioVAtrb bits returned by PBHGetVInfo and PBXGetVolInfo */
321  enum
322  {
323  kioVAtrbDefaultVolumeBit = 5, /* Set if the volume is the default volume */
324  kioVAtrbDefaultVolumeMask = 0x0020,
325  kioVAtrbFilesOpenBit = 6, /* Set if there are open files or iterators */
326  kioVAtrbFilesOpenMask = 0x0040,
327  kioVAtrbHardwareLockedBit =
328  7, /* Set if volume is locked by a hardware setting */
329  kioVAtrbHardwareLockedMask = 0x0080,
330  kioVAtrbSoftwareLockedBit = 15, /* Set if volume is locked by software */
331  kioVAtrbSoftwareLockedMask = 0x8000
332  };
333 
334  /* ioFlAttrib bits returned by PBGetCatInfo */
335  enum
336  {
337  /* file and directory attributes in ioFlAttrib */
338  kioFlAttribLockedBit = 0, /* Set if file or directory is locked */
339  kioFlAttribLockedMask = 0x01,
340  kioFlAttribResOpenBit = 2, /* Set if resource fork is open */
341  kioFlAttribResOpenMask = 0x04,
342  kioFlAttribDataOpenBit = 3, /* Set if data fork is open */
343  kioFlAttribDataOpenMask = 0x08,
344  kioFlAttribDirBit = 4, /* Set if this is a directory */
345  kioFlAttribDirMask = 0x10,
346  ioDirFlg = 4, /* Set if this is a directory (old name) */
347  ioDirMask = 0x10,
348  kioFlAttribCopyProtBit =
349  6, /* Set if AppleShare server "copy-protects" the file */
350  kioFlAttribCopyProtMask = 0x40,
351  kioFlAttribFileOpenBit = 7, /* Set if file (either fork) is open */
352  kioFlAttribFileOpenMask = 0x80, /* ioFlAttrib for directories only */
353  kioFlAttribInSharedBit = 2, /* Set if the directory is within a shared area of
354  the directory hierarchy */
355  kioFlAttribInSharedMask = 0x04,
356  kioFlAttribMountedBit = 3, /* Set if the directory is a share point that is
357  mounted by some user */
358  kioFlAttribMountedMask = 0x08,
359  kioFlAttribSharePointBit = 5, /* Set if the directory is a share point */
360  kioFlAttribSharePointMask = 0x20
361  };
362 
363  /* ioFCBFlags bits returned by PBGetFCBInfo */
364  enum
365  {
366  kioFCBWriteBit = 8, /* Data can be written to this file */
367  kioFCBWriteMask = 0x0100,
368  kioFCBResourceBit = 9, /* This file is a resource fork */
369  kioFCBResourceMask = 0x0200,
370  kioFCBWriteLockedBit = 10, /* File has a locked byte range */
371  kioFCBWriteLockedMask = 0x0400,
372  kioFCBLargeFileBit =
373  11, /* File may grow beyond 2GB; cache uses file blocks, not bytes */
374  kioFCBLargeFileMask = 0x0800,
375  kioFCBSharedWriteBit = 12, /* File is open for shared write access */
376  kioFCBSharedWriteMask = 0x1000,
377  kioFCBFileLockedBit = 13, /* File is locked (write-protected) */
378  kioFCBFileLockedMask = 0x2000,
379  kioFCBOwnClumpBit = 14, /* File has clump size specified in FCB */
380  kioFCBOwnClumpMask = 0x4000,
381  kioFCBModifiedBit = 15, /* File has changed since it was last flushed */
382  kioFCBModifiedMask = 0x8000
383  };
384 
385  /* ioACUser bits returned by PBGetCatInfo */
386  /* Note: you must clear ioACUser before calling PBGetCatInfo because some file
387  * systems do not use this field */
388  enum
389  {
390  kioACUserNoSeeFolderBit =
391  0, /* Set if user does not have See Folder privileges */
392  kioACUserNoSeeFolderMask = 0x01,
393  kioACUserNoSeeFilesBit =
394  1, /* Set if user does not have See Files privileges */
395  kioACUserNoSeeFilesMask = 0x02,
396  kioACUserNoMakeChangesBit =
397  2, /* Set if user does not have Make Changes privileges */
398  kioACUserNoMakeChangesMask = 0x04,
399  kioACUserNotOwnerBit = 7, /* Set if user is not owner of the directory */
400  kioACUserNotOwnerMask = 0x80
401  };
402 
403  /* Folder and File values of access privileges in ioACAccess */
404  enum
405  {
406  kioACAccessOwnerBit = 31, /* User is owner of directory */
407  kioACAccessOwnerMask = (long)0x80000000,
408  kioACAccessBlankAccessBit = 28, /* Directory has blank access privileges */
409  kioACAccessBlankAccessMask = 0x10000000,
410  kioACAccessUserWriteBit = 26, /* User has write privileges */
411  kioACAccessUserWriteMask = 0x04000000,
412  kioACAccessUserReadBit = 25, /* User has read privileges */
413  kioACAccessUserReadMask = 0x02000000,
414  kioACAccessUserSearchBit = 24, /* User has search privileges */
415  kioACAccessUserSearchMask = 0x01000000,
416  kioACAccessEveryoneWriteBit = 18, /* Everyone has write privileges */
417  kioACAccessEveryoneWriteMask = 0x00040000,
418  kioACAccessEveryoneReadBit = 17, /* Everyone has read privileges */
419  kioACAccessEveryoneReadMask = 0x00020000,
420  kioACAccessEveryoneSearchBit = 16, /* Everyone has search privileges */
421  kioACAccessEveryoneSearchMask = 0x00010000,
422  kioACAccessGroupWriteBit = 10, /* Group has write privileges */
423  kioACAccessGroupWriteMask = 0x00000400,
424  kioACAccessGroupReadBit = 9, /* Group has read privileges */
425  kioACAccessGroupReadMask = 0x00000200,
426  kioACAccessGroupSearchBit = 8, /* Group has search privileges */
427  kioACAccessGroupSearchMask = 0x00000100,
428  kioACAccessOwnerWriteBit = 2, /* Owner has write privileges */
429  kioACAccessOwnerWriteMask = 0x00000004,
430  kioACAccessOwnerReadBit = 1, /* Owner has read privileges */
431  kioACAccessOwnerReadMask = 0x00000002,
432  kioACAccessOwnerSearchBit = 0, /* Owner has search privileges */
433  kioACAccessOwnerSearchMask = 0x00000001,
434  kfullPrivileges = 0x00070007, /* all privileges for everybody and owner*/
435  kownerPrivileges = 0x00000007 /* all privileges for owner only*/
436  };
437 
438  /* values of user IDs and group IDs */
439  enum
440  {
441  knoUser = 0,
442  kadministratorUser = 1
443  };
444 
445  enum
446  {
447  knoGroup = 0
448  };
449 
451  {
452  short vMVersion; /*version number*/
453  long vMAttrib; /*bit vector of attributes (see vMAttrib constants)*/
454  Handle vMLocalHand; /*handle to private data*/
455  long vMServerAdr; /*AppleTalk server address or zero*/
456  /* vMVersion 1 GetVolParmsInfoBuffer ends here */
457  long vMVolumeGrade; /*approx. speed rating or zero if unrated*/
458  short vMForeignPrivID; /*foreign privilege model supported or zero if none*/
459  /* vMVersion 2 GetVolParmsInfoBuffer ends here */
460  long vMExtendedAttributes; /*extended attribute bits (see vMExtendedAttributes
461  constants)*/
462  /* vMVersion 3 GetVolParmsInfoBuffer ends here */
463  void *vMDeviceID; /* device id name for interoperability with IOKit */
464  /* vMVersion 4 GetVolParmsInfoBuffer ends here */
465  };
467  typedef union ParamBlockRec ParamBlockRec;
468 
469  typedef ParamBlockRec *ParmBlkPtr;
470  typedef CALLBACK_API_REGISTER68K(void, IOCompletionProcPtr,
471  (ParmBlkPtr paramBlock));
472  typedef REGISTER_UPP_TYPE(IOCompletionProcPtr) IOCompletionUPP;
473  struct IOParam
474  {
475  QElemPtr qLink; /*queue link in header*/
476  short qType; /*type byte for safety check*/
477  short ioTrap; /*FS: the Trap*/
478  Ptr ioCmdAddr; /*FS: address to dispatch to*/
479  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
480  volatile OSErr ioResult; /*result code*/
481  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
482  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
483  short ioRefNum; /*refNum for I/O operation*/
484  SInt8 ioVersNum; /*version number*/
485  SInt8 ioPermssn; /*Open: permissions (byte)*/
486  Ptr ioMisc; /*Rename: new name (GetEOF,SetEOF: logical end of file) (Open:
487  optional ptr to buffer) (SetFileType: new type)*/
488  Ptr ioBuffer; /*data buffer Ptr*/
489  long ioReqCount; /*requested byte count; also = ioNewDirID*/
490  long ioActCount; /*actual byte count completed*/
491  short ioPosMode; /*initial file positioning*/
492  long ioPosOffset; /*file position offset*/
493  };
494  typedef struct IOParam IOParam;
495  typedef IOParam *IOParamPtr;
496  struct FileParam
497  {
498  QElemPtr qLink; /*queue link in header*/
499  short qType; /*type byte for safety check*/
500  short ioTrap; /*FS: the Trap*/
501  Ptr ioCmdAddr; /*FS: address to dispatch to*/
502  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
503  volatile OSErr ioResult; /*result code*/
504  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
505  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
506  short ioFRefNum; /*reference number*/
507  SInt8 ioFVersNum; /*version number*/
508  SInt8 filler1;
509  short ioFDirIndex; /*GetFInfo directory index*/
510  SInt8 ioFlAttrib; /*GetFInfo: in-use bit=7, lock bit=0*/
511  SInt8 ioFlVersNum; /*file version number*/
512  FInfo ioFlFndrInfo; /*user info*/
513  unsigned long ioFlNum; /*GetFInfo: file number; TF- ioDirID*/
514  unsigned short ioFlStBlk; /*start file block (0 if none)*/
515  long ioFlLgLen; /*logical length (EOF)*/
516  long ioFlPyLen; /*physical length*/
517  unsigned short ioFlRStBlk; /*start block rsrc fork*/
518  long ioFlRLgLen; /*file logical length rsrc fork*/
519  long ioFlRPyLen; /*file physical length rsrc fork*/
520  unsigned long ioFlCrDat; /*file creation date& time (32 bits in secs)*/
521  unsigned long ioFlMdDat; /*last modified date and time*/
522  };
523  typedef struct FileParam FileParam;
524  typedef FileParam *FileParamPtr;
525  struct VolumeParam
526  {
527  QElemPtr qLink; /*queue link in header*/
528  short qType; /*type byte for safety check*/
529  short ioTrap; /*FS: the Trap*/
530  Ptr ioCmdAddr; /*FS: address to dispatch to*/
531  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
532  volatile OSErr ioResult; /*result code*/
533  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
534  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
535  long filler2;
536  short ioVolIndex; /*volume index number*/
537  unsigned long ioVCrDate; /*creation date and time*/
538  unsigned long ioVLsBkUp; /*last backup date and time*/
539  unsigned short ioVAtrb; /*volume attrib*/
540  unsigned short ioVNmFls; /*number of files in directory*/
541  unsigned short ioVDirSt; /*start block of file directory*/
542  short ioVBlLn; /*GetVolInfo: length of dir in blocks*/
543  unsigned short
544  ioVNmAlBlks; /*for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB*/
545  unsigned long
546  ioVAlBlkSiz; /*for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024)*/
547  unsigned long ioVClpSiz; /*GetVolInfo: bytes to allocate at a time*/
548  unsigned short ioAlBlSt; /*starting disk(512-byte) block in block map*/
549  unsigned long ioVNxtFNum; /*GetVolInfo: next free file number*/
550  unsigned short ioVFrBlk; /*GetVolInfo: # free alloc blks for this vol*/
551  };
552  typedef struct VolumeParam VolumeParam;
553  typedef VolumeParam *VolumeParamPtr;
554  struct CntrlParam
555  {
556  QElemPtr qLink; /*queue link in header*/
557  short qType; /*type byte for safety check*/
558  short ioTrap; /*FS: the Trap*/
559  Ptr ioCmdAddr; /*FS: address to dispatch to*/
560  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
561  volatile OSErr ioResult; /*result code*/
562  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
563  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
564  short ioCRefNum; /*refNum for I/O operation*/
565  short csCode; /*word for control status code*/
566  short csParam[11]; /*operation-defined parameters*/
567  };
568  typedef struct CntrlParam CntrlParam;
569  typedef CntrlParam *CntrlParamPtr;
571  {
572  QElemPtr qLink; /*queue link in header*/
573  short qType; /*type byte for safety check*/
574  short ioTrap; /*FS: the Trap*/
575  Ptr ioCmdAddr; /*FS: address to dispatch to*/
576  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
577  volatile OSErr ioResult; /*result code*/
578  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
579  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
580  short ioSRefNum;
581  SInt8 ioSVersNum;
582  SInt8 ioSPermssn;
583  Ptr ioSMix;
584  short ioSFlags;
585  SInt8 ioSlot;
586  SInt8 ioID;
587  };
588  typedef struct SlotDevParam SlotDevParam;
589  typedef SlotDevParam *SlotDevParamPtr;
591  {
592  QElemPtr qLink; /*queue link in header*/
593  short qType; /*type byte for safety check*/
594  short ioTrap; /*FS: the Trap*/
595  Ptr ioCmdAddr; /*FS: address to dispatch to*/
596  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
597  volatile OSErr ioResult; /*result code*/
598  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
599  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
600  short ioMRefNum;
601  SInt8 ioMVersNum;
602  SInt8 ioMPermssn;
603  Ptr ioMMix;
604  short ioMFlags;
605  Ptr ioSEBlkPtr;
606  };
607  typedef struct MultiDevParam MultiDevParam;
640  {
644  CntrlParam cntrlParam;
645  SlotDevParam slotDevParam;
646  MultiDevParam multiDevParam;
647  } ParamBlockRec;
649  struct HFileInfo
650  {
651  QElemPtr qLink; /*queue link in header*/
652  short qType; /*type byte for safety check*/
653  short ioTrap; /*FS: the Trap*/
654  Ptr ioCmdAddr; /*FS: address to dispatch to*/
655  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
656  volatile OSErr ioResult; /*result code*/
657  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
658  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
659  short ioFRefNum;
660  SInt8 ioFVersNum;
661  SInt8 filler1;
662  short ioFDirIndex;
663  SInt8 ioFlAttrib;
664  SInt8 ioACUser;
665  FInfo ioFlFndrInfo;
666  long ioDirID;
667  unsigned short ioFlStBlk;
668  long ioFlLgLen;
669  long ioFlPyLen;
670  unsigned short ioFlRStBlk;
671  long ioFlRLgLen;
672  long ioFlRPyLen;
673  unsigned long ioFlCrDat;
674  unsigned long ioFlMdDat;
675  unsigned long ioFlBkDat;
676  FXInfo ioFlXFndrInfo;
677  long ioFlParID;
678  long ioFlClpSiz;
679  };
680  typedef struct HFileInfo HFileInfo;
681  struct DirInfo
682  {
683  QElemPtr qLink; /*queue link in header*/
684  short qType; /*type byte for safety check*/
685  short ioTrap; /*FS: the Trap*/
686  Ptr ioCmdAddr; /*FS: address to dispatch to*/
687  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
688  volatile OSErr ioResult; /*result code*/
689  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
690  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
691  short ioFRefNum;
692  SInt8 ioFVersNum;
693  SInt8 filler1;
694  short ioFDirIndex;
695  SInt8 ioFlAttrib;
696  SInt8 ioACUser;
697  DInfo ioDrUsrWds;
698  long ioDrDirID;
699  unsigned short ioDrNmFls;
700  short filler3[9];
701  unsigned long ioDrCrDat;
702  unsigned long ioDrMdDat;
703  unsigned long ioDrBkDat;
704  DXInfo ioDrFndrInfo;
705  long ioDrParID;
706  };
707  typedef struct DirInfo DirInfo;
717  HFileInfo *hfipb = (HFileInfo *)&cipb; /* and separate struc ptrs */
718  DirInfo *dipb = (DirInfo *)&cipb; /* pointing same address */
719  cipb.hFileInfo.vRefNum = 2; /* as a union member field */
720  cipb.dirInfo.ioDrFndrInfo.frLocation.h = 100;
721  hfipb->vRefNum = 2; /* or as a structure field */
722  dipb->ioDrFndrInfo.frLocation.h = 100;
723  You can also perform ad hoc type coercion : unsigned char pb[108]; /* big enough to hold either struct */
724  short theVRef;
725  theVRef = ((HFileInfo *)pb)->ioVRefNum; /* fetch 1 field */
726  ((HFileParam *)pb)->ioFlLgLen = 1000L; /* change some fields */
727  ((HFileInfo *)pb)->ioFlClpSiz = 2048;
728  GetDateTime(&((HFileInfo *)pb)->ioFlMdDat);
729  /* access chars of a long */
730  printf("File type is '%c%c%c%c'\n", pb[32], pb[33], pb[34], pb[35]);
731  </ pre>
732  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
733  * /
734  union CInfoPBRec
735  {
736  HFileInfo hFileInfo;
737  DirInfo dirInfo;
738  } CInfoPBRec;
740  typedef union CInfoPBRec CInfoPBRec;
741  typedef CInfoPBRec *CInfoPBPtr;
742  struct XCInfoPBRec
743  {
744  QElemPtr qLink;
745  short qType;
746  short ioTrap;
747  Ptr ioCmdAddr;
748  ProcPtr ioCompletion; /* --> A pointer to a completion routine */
749  volatile OSErr ioResult; /* --> The result code of the function */
750  StringPtr ioNamePtr; /* --> Pointer to pathname to object */
751  short ioVRefNum; /* --> A volume specification */
752  long filler1;
753  StringPtr ioShortNamePtr; /* <-> A pointer to the short name string buffer -
754  required! */
755  short filler2;
756  short ioPDType; /* <-- The ProDOS file type */
757  long ioPDAuxType; /* <-- The ProDOS aux type */
758  long filler3[2];
759  long ioDirID; /* --> A directory ID */
760  };
761  typedef struct XCInfoPBRec XCInfoPBRec;
762  typedef XCInfoPBRec *XCInfoPBPtr;
763  /* Catalog position record */
764  struct CatPositionRec
765  {
766  long initialize;
767  short priv[6];
768  };
769  typedef struct CatPositionRec CatPositionRec;
770  struct FSSpec
771  {
772  short vRefNum;
773  long parID;
774  StrFileName name; /* a Str63 on MacOS*/
775  };
776  typedef struct FSSpec FSSpec;
777  typedef FSSpec *FSSpecPtr;
778  typedef FSSpecPtr *FSSpecHandle;
779  /* pointer to array of FSSpecs */
780  typedef FSSpecPtr FSSpecArrayPtr;
785  typedef const FSSpec *ConstFSSpecPtr;
791  /* the "signature" of the file system */
792  typedef OSType VolumeType;
793  enum
794  {
795  /* the signature for AppleShare */
796  AppleShareMediaType = FOUR_CHAR_CODE('afpm')
797  };
798 
802  struct VolMountInfoHeader
803  {
804  short length; /* length of location data (including self) */
805  VolumeType media; /* type of media. Variable length data follows */
806  };
807  typedef struct VolMountInfoHeader VolMountInfoHeader;
808  typedef VolMountInfoHeader *VolMountInfoPtr;
809  /* The new volume mount info record. The old one is included for compatibility.
810  the new record allows access by foriegn filesystems writers to the flags
811  portion of the record. This portion is now public.
812  */
813  struct VolumeMountInfoHeader
814  {
815  short length; /* length of location data (including self) */
816  VolumeType media; /* type of media (must be registered with Apple) */
817  short flags; /* volume mount flags. Variable length data follows */
818  };
819  typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
820  typedef VolumeMountInfoHeader *VolumeMountInfoHeaderPtr;
821  /* volume mount flags */
822  enum
823  {
824  volMountNoLoginMsgFlagBit =
825  0, /* Input to VolumeMount: If set, the file system */
826  volMountNoLoginMsgFlagMask =
827  0x0001, /* should suppresss any log-in message/greeting dialog */
828  volMountExtendedFlagsBit =
829  7, /* Input to VolumeMount: If set, the mount info is a */
830  volMountExtendedFlagsMask =
831  0x0080, /* AFPXVolMountInfo record for 3.7 AppleShare Client */
832  volMountInteractBit =
833  15, /* Input to VolumeMount: If set, it's OK for the file system */
834  volMountInteractMask =
835  0x8000, /* to perform user interaction to mount the volume */
836  volMountChangedBit =
837  14, /* Output from VoumeMount: If set, the volume was mounted, but */
838  volMountChangedMask =
839  0x4000, /* the volume mounting information record needs to be updated. */
840  volMountFSReservedMask =
841  0x00FF, /* bits 0-7 are defined by each file system for its own use */
842  volMountSysReservedMask =
843  0xFF00 /* bits 8-15 are reserved for Apple system use */
844  };
845 
846  struct AFPVolMountInfo
847  {
848  short length; /* length of location data (including self) */
849  VolumeType media; /* type of media */
850  short flags; /* bits for no messages, no reconnect */
851  SInt8 nbpInterval; /* NBP Interval parameter (IM2, p.322) */
852  SInt8 nbpCount; /* NBP Interval parameter (IM2, p.322) */
853  short uamType; /* User Authentication Method */
854  short zoneNameOffset; /* short positive offset from start of struct to Zone
855  Name */
856  short serverNameOffset; /* offset to pascal Server Name string */
857  short volNameOffset; /* offset to pascal Volume Name string */
858  short userNameOffset; /* offset to pascal User Name string */
859  short userPasswordOffset; /* offset to pascal User Password string */
860  short volPasswordOffset; /* offset to pascal Volume Password string */
861  char AFPData[144]; /* variable length data may follow */
862  };
863  typedef struct AFPVolMountInfo AFPVolMountInfo;
864  typedef AFPVolMountInfo *AFPVolMountInfoPtr;
865 
866  /* AFPXVolMountInfo is the new AFP volume mount info record, requires the 3.7
867  * AppleShare Client */
868  struct AFPXVolMountInfo
869  {
870  short length; /* length of location data (including self) */
871  VolumeType media; /* type of media */
872  short flags; /* bits for no messages, no reconnect */
873  SInt8 nbpInterval; /* NBP Interval parameter (IM2, p.322) */
874  SInt8 nbpCount; /* NBP Interval parameter (IM2, p.322) */
875  short uamType; /* User Authentication Method type */
876  short zoneNameOffset; /* short positive offset from start of struct to Zone
877  Name */
878  short serverNameOffset; /* offset to pascal Server Name string */
879  short volNameOffset; /* offset to pascal Volume Name string */
880  short userNameOffset; /* offset to pascal User Name string */
881  short userPasswordOffset; /* offset to pascal User Password string */
882  short volPasswordOffset; /* offset to pascal Volume Password string */
883  short extendedFlags; /* extended flags word */
884  short uamNameOffset; /* offset to a pascal UAM name string */
885  short alternateAddressOffset; /* offset to Alternate Addresses in tagged
886  format */
887  char AFPData[176]; /* variable length data may follow */
888  };
889  typedef struct AFPXVolMountInfo AFPXVolMountInfo;
890  typedef AFPXVolMountInfo *AFPXVolMountInfoPtr;
891  enum
892  {
893  kAFPExtendedFlagsAlternateAddressMask =
894  1 /* bit in AFPXVolMountInfo.extendedFlags that means
895  alternateAddressOffset is used*/
896  };
897 
898  enum
899  {
900  /* constants for use in AFPTagData.fType field*/
901  kAFPTagTypeIP = 0x01, /* 4 byte IP address (MSB first) */
902  kAFPTagTypeIPPort = 0x02, /* 4 byte IP address, 2 byte port (MSB first) */
903  kAFPTagTypeDDP = 0x03, /* Net,Node,Socket Sent by the server, currently unused
904  by the client */
905  kAFPTagTypeDNS = 0x04 /* DNS name in address:port format (total length
906  variable up to 254 chars of dns name) */
907  };
908 
909  enum
910  {
911  /* constants for use in AFPTagData.fLength field*/
912  kAFPTagLengthIP = 0x06,
913  kAFPTagLengthIPPort = 0x08,
914  kAFPTagLengthDDP = 0x06
915  };
916 
917  struct AFPTagData
918  {
919  UInt8 fLength; /* length of this data tag including the fLength field */
920  UInt8 fType;
921  UInt8 fData[1]; /* variable length data */
922  };
923  typedef struct AFPTagData AFPTagData;
924  struct AFPAlternateAddress
925  {
926  /* ©©©©NOTE: fVersion was missing in 3.2 Universal Interfaces*/
927  UInt8 fVersion; /* version of the structure (currently 0x00)*/
928  UInt8 fAddressCount;
929  UInt8 fAddressList[1]; /* actually variable length packed set of AFPTagData */
930  };
931  typedef struct AFPAlternateAddress AFPAlternateAddress;
932  struct DTPBRec
933  {
934  QElemPtr qLink; /*queue link in header*/
935  short qType; /*type byte for safety check*/
936  short ioTrap; /*FS: the Trap*/
937  Ptr ioCmdAddr; /*FS: address to dispatch to*/
938  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
939  volatile OSErr ioResult; /*result code*/
940  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
941  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
942  short ioDTRefNum; /* desktop refnum */
943  short ioIndex;
944  long ioTagInfo;
945  Ptr ioDTBuffer;
946  long ioDTReqCount;
947  long ioDTActCount;
948  SInt8 ioFiller1;
949  UInt8 ioIconType;
950  short ioFiller2;
951  long ioDirID;
952  OSType ioFileCreator;
953  OSType ioFileType;
954  long ioFiller3;
955  long ioDTLgLen;
956  long ioDTPyLen;
957  short ioFiller4[14];
958  long ioAPPLParID;
959  };
960  typedef struct DTPBRec DTPBRec;
961  typedef DTPBRec *DTPBPtr;
962 
963  struct HIOParam
964  {
965  QElemPtr qLink; /*queue link in header*/
966  short qType; /*type byte for safety check*/
967  short ioTrap; /*FS: the Trap*/
968  Ptr ioCmdAddr; /*FS: address to dispatch to*/
969  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
970  volatile OSErr ioResult; /*result code*/
971  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
972  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
973  short ioRefNum;
974  SInt8 ioVersNum;
975  SInt8 ioPermssn;
976  Ptr ioMisc;
977  Ptr ioBuffer;
978  long ioReqCount;
979  long ioActCount;
980  short ioPosMode;
981  long ioPosOffset;
982  };
983  typedef struct HIOParam HIOParam;
984  typedef HIOParam *HIOParamPtr;
985  struct HFileParam
986  {
987  QElemPtr qLink; /*queue link in header*/
988  short qType; /*type byte for safety check*/
989  short ioTrap; /*FS: the Trap*/
990  Ptr ioCmdAddr; /*FS: address to dispatch to*/
991  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
992  volatile OSErr ioResult; /*result code*/
993  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
994  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
995  short ioFRefNum;
996  SInt8 ioFVersNum;
997  SInt8 filler1;
998  short ioFDirIndex;
999  SInt8 ioFlAttrib;
1000  SInt8 ioFlVersNum;
1001  FInfo ioFlFndrInfo;
1002  long ioDirID;
1003  unsigned short ioFlStBlk;
1004  long ioFlLgLen;
1005  long ioFlPyLen;
1006  unsigned short ioFlRStBlk;
1007  long ioFlRLgLen;
1008  long ioFlRPyLen;
1009  unsigned long ioFlCrDat;
1010  unsigned long ioFlMdDat;
1011  };
1012  typedef struct HFileParam HFileParam;
1013  typedef HFileParam *HFileParamPtr;
1014  struct HVolumeParam
1015  {
1016  QElemPtr qLink; /*queue link in header*/
1017  short qType; /*type byte for safety check*/
1018  short ioTrap; /*FS: the Trap*/
1019  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1020  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1021  volatile OSErr ioResult; /*result code*/
1022  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1023  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1024  long filler2;
1025  short ioVolIndex;
1026  unsigned long ioVCrDate;
1027  unsigned long ioVLsMod;
1028  short ioVAtrb;
1029  unsigned short ioVNmFls;
1030  unsigned short ioVBitMap;
1031  unsigned short ioAllocPtr;
1032  unsigned short ioVNmAlBlks;
1033  unsigned long ioVAlBlkSiz;
1034  unsigned long ioVClpSiz;
1035  unsigned short ioAlBlSt;
1036  unsigned long ioVNxtCNID;
1037  unsigned short ioVFrBlk;
1038  unsigned short ioVSigWord;
1039  short ioVDrvInfo;
1040  short ioVDRefNum;
1041  short ioVFSID;
1042  unsigned long ioVBkUp;
1043  short ioVSeqNum;
1044  unsigned long ioVWrCnt;
1045  unsigned long ioVFilCnt;
1046  unsigned long ioVDirCnt;
1047  long ioVFndrInfo[8];
1048  };
1049  typedef struct HVolumeParam HVolumeParam;
1050  typedef HVolumeParam *HVolumeParamPtr;
1051  struct XIOParam
1052  {
1053  QElemPtr qLink;
1054  short qType;
1055  short ioTrap;
1056  Ptr ioCmdAddr;
1057  IOCompletionUPP ioCompletion;
1058  volatile OSErr ioResult;
1059  StringPtr ioNamePtr;
1060  short ioVRefNum;
1061  short ioRefNum;
1062  SInt8 ioVersNum;
1063  SInt8 ioPermssn;
1064  Ptr ioMisc;
1065  Ptr ioBuffer;
1066  long ioReqCount;
1067  long ioActCount;
1068  short ioPosMode; /* must have kUseWidePositioning bit set */
1069  wide ioWPosOffset; /* wide positioning offset */
1070  };
1071  typedef struct XIOParam XIOParam;
1072  typedef XIOParam *XIOParamPtr;
1073  struct XVolumeParam
1074  {
1075  QElemPtr qLink;
1076  short qType;
1077  short ioTrap;
1078  Ptr ioCmdAddr;
1079  IOCompletionUPP ioCompletion;
1080  volatile OSErr ioResult;
1081  StringPtr ioNamePtr;
1082  short ioVRefNum;
1083  unsigned long ioXVersion; /* this XVolumeParam version (0) */
1084  short ioVolIndex;
1085  unsigned long ioVCrDate;
1086  unsigned long ioVLsMod;
1087  short ioVAtrb;
1088  unsigned short ioVNmFls;
1089  unsigned short ioVBitMap;
1090  unsigned short ioAllocPtr;
1091  unsigned short ioVNmAlBlks;
1092  unsigned long ioVAlBlkSiz;
1093  unsigned long ioVClpSiz;
1094  unsigned short ioAlBlSt;
1095  unsigned long ioVNxtCNID;
1096  unsigned short ioVFrBlk;
1097  unsigned short ioVSigWord;
1098  short ioVDrvInfo;
1099  short ioVDRefNum;
1100  short ioVFSID;
1101  unsigned long ioVBkUp;
1102  short ioVSeqNum;
1103  unsigned long ioVWrCnt;
1104  unsigned long ioVFilCnt;
1105  unsigned long ioVDirCnt;
1106  long ioVFndrInfo[8];
1107  UInt64 ioVTotalBytes; /* total number of bytes on volume */
1108  UInt64 ioVFreeBytes; /* number of free bytes on volume */
1109  };
1110  typedef struct XVolumeParam XVolumeParam;
1111  typedef XVolumeParam *XVolumeParamPtr;
1112  struct AccessParam
1113  {
1114  QElemPtr qLink; /*queue link in header*/
1115  short qType; /*type byte for safety check*/
1116  short ioTrap; /*FS: the Trap*/
1117  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1118  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1119  volatile OSErr ioResult; /*result code*/
1120  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1121  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1122  short filler3;
1123  short ioDenyModes; /*access rights data*/
1124  short filler4;
1125  SInt8 filler5;
1126  SInt8 ioACUser; /*access rights for directory only*/
1127  long filler6;
1128  long ioACOwnerID; /*owner ID*/
1129  long ioACGroupID; /*group ID*/
1130  long ioACAccess; /*access rights*/
1131  long ioDirID;
1132  };
1133  typedef struct AccessParam AccessParam;
1134  typedef AccessParam *AccessParamPtr;
1135  struct ObjParam
1136  {
1137  QElemPtr qLink; /*queue link in header*/
1138  short qType; /*type byte for safety check*/
1139  short ioTrap; /*FS: the Trap*/
1140  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1141  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1142  volatile OSErr ioResult; /*result code*/
1143  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1144  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1145  short filler7;
1146  short ioObjType; /*function code*/
1147  StringPtr ioObjNamePtr; /*ptr to returned creator/group name*/
1148  long ioObjID; /*creator/group ID*/
1149  };
1150  typedef struct ObjParam ObjParam;
1151  typedef ObjParam *ObjParamPtr;
1152  struct CopyParam
1153  {
1154  QElemPtr qLink; /*queue link in header*/
1155  short qType; /*type byte for safety check*/
1156  short ioTrap; /*FS: the Trap*/
1157  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1158  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1159  volatile OSErr ioResult; /*result code*/
1160  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1161  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1162  short ioDstVRefNum; /*destination vol identifier*/
1163  short filler8;
1164  StringPtr ioNewName; /*ptr to destination pathname*/
1165  StringPtr ioCopyName; /*ptr to optional name*/
1166  long ioNewDirID; /*destination directory ID*/
1167  long filler14;
1168  long filler15;
1169  long ioDirID;
1170  };
1171  typedef struct CopyParam CopyParam;
1172  typedef CopyParam *CopyParamPtr;
1173  struct WDParam
1174  {
1175  QElemPtr qLink; /*queue link in header*/
1176  short qType; /*type byte for safety check*/
1177  short ioTrap; /*FS: the Trap*/
1178  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1179  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1180  volatile OSErr ioResult; /*result code*/
1181  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1182  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1183  short ioWDCreated;
1184  short ioWDIndex;
1185  long ioWDProcID;
1186  short ioWDVRefNum;
1187  short filler10;
1188  long filler11;
1189  long filler12;
1190  long filler13;
1191  long ioWDDirID;
1192  };
1193  typedef struct WDParam WDParam;
1194  typedef WDParam *WDParamPtr;
1195  struct FIDParam
1196  {
1197  QElemPtr qLink; /*queue link in header*/
1198  short qType; /*type byte for safety check*/
1199  short ioTrap; /*FS: the Trap*/
1200  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1201  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1202  volatile OSErr ioResult; /*result code*/
1203  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1204  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1205  long filler14;
1206  StringPtr ioDestNamePtr; /* dest file name */
1207  long filler15;
1208  long ioDestDirID; /* dest file's directory id */
1209  long filler16;
1210  long filler17;
1211  long ioSrcDirID; /* source file's directory id */
1212  short filler18;
1213  long ioFileID; /* file ID */
1214  };
1215  typedef struct FIDParam FIDParam;
1216  typedef FIDParam *FIDParamPtr;
1217  struct ForeignPrivParam
1218  {
1219  QElemPtr qLink; /*queue link in header*/
1220  short qType; /*type byte for safety check*/
1221  short ioTrap; /*FS: the Trap*/
1222  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1223  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1224  volatile OSErr ioResult; /*result code*/
1225  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1226  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1227  long ioFiller21;
1228  long ioFiller22;
1229  Ptr ioForeignPrivBuffer;
1230  long ioForeignPrivActCount;
1231  long ioForeignPrivReqCount;
1232  long ioFiller23;
1233  long ioForeignPrivDirID;
1234  long ioForeignPrivInfo1;
1235  long ioForeignPrivInfo2;
1236  long ioForeignPrivInfo3;
1237  long ioForeignPrivInfo4;
1238  };
1239  typedef struct ForeignPrivParam ForeignPrivParam;
1240  typedef ForeignPrivParam *ForeignPrivParamPtr;
1241  struct CSParam
1242  {
1243  QElemPtr qLink; /*queue link in header*/
1244  short qType; /*type byte for safety check*/
1245  short ioTrap; /*FS: the Trap*/
1246  Ptr ioCmdAddr; /*FS: address to dispatch to*/
1247  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
1248  volatile OSErr ioResult; /*result code*/
1249  StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
1250  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
1251  FSSpecPtr ioMatchPtr; /* match array */
1252  long ioReqMatchCount; /* maximum allowable matches */
1253  long ioActMatchCount; /* actual match count */
1254  long ioSearchBits; /* search criteria selector */
1255  CInfoPBPtr ioSearchInfo1; /* search values and range lower bounds */
1256  CInfoPBPtr ioSearchInfo2; /* search values and range upper bounds */
1257  long ioSearchTime; /* length of time to run search */
1258  CatPositionRec ioCatPosition; /* current position in the catalog */
1259  Ptr ioOptBuffer; /* optional performance enhancement buffer */
1260  long ioOptBufSize; /* size of buffer pointed to by ioOptBuffer */
1261  };
1262  typedef struct CSParam CSParam;
1263  typedef CSParam *CSParamPtr;
1277  HIOParam *hipb = (HIOParam *)&hpb; /* and struc ptrs */
1278  HFileParam *hfpb = (HFileParam *)&hpb; /* all point same addr */
1279  HVolumeParam *hvpb = (HVolumeParam *)&hpb;
1280  AccessParam *hapb = (AccessParam *)&hpb;
1281  ObjParam *hopb = (ObjParam *)&hpb;
1282  CopyParam *hcpb = (CopyParam *)&hpb;
1283  WDParam *hwpb = (WDParam *)&hpb;
1284  hpb.ioParam.ioVRefNum = 2; /* as a union member */
1285  hpb.fileParam.ioFlFndrInfo.fdType = 'TEXT';
1286  hpb.volumeParam.ioVolIndex = 0;
1287  hpb.accessParam.ioDenyModes = 0;
1288  hpb.objParam.ioObjType = 2;
1289  hpb.copyParam.ioDstVRefNum = 1;
1290  hpb.wdParam.ioWDIndex = 1;
1291  hipb->ioVRefNum = 2; /* or as a structure field */
1292  hfpb->ioFlFndrInfo.fdType = 'TEXT';
1293  </ pre>
1294  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
1295  * /
1296  union HParamBlockRec
1297  {
1298  HIOParam ioParam;
1299  HFileParam fileParam;
1300  HVolumeParam volumeParam;
1301  AccessParam accessParam;
1302  ObjParam objParam;
1303  CopyParam copyParam;
1304  WDParam wdParam;
1305  FIDParam fidParam;
1306  CSParam csParam;
1307  ForeignPrivParam foreignPrivParam;
1310  typedef union HParamBlockRec HParamBlockRec;
1311 
1312  typedef HParamBlockRec *HParmBlkPtr;
1313 
1314  struct CMovePBRec
1315  {
1316  QElemPtr qLink;
1317  short qType;
1318  short ioTrap;
1319  Ptr ioCmdAddr;
1320  IOCompletionUPP ioCompletion;
1321  volatile OSErr ioResult;
1322  StringPtr ioNamePtr;
1323  short ioVRefNum;
1324  long filler1;
1325  StringPtr ioNewName;
1326  long filler2;
1327  long ioNewDirID;
1328  long filler3[2];
1329  long ioDirID;
1330  };
1331  typedef struct CMovePBRec CMovePBRec;
1332  typedef CMovePBRec *CMovePBPtr;
1333  struct WDPBRec
1334  {
1335  QElemPtr qLink;
1336  short qType;
1337  short ioTrap;
1338  Ptr ioCmdAddr;
1339  IOCompletionUPP ioCompletion;
1340  volatile OSErr ioResult;
1341  StringPtr ioNamePtr;
1342  short ioVRefNum;
1343  short filler1;
1344  short ioWDIndex;
1345  long ioWDProcID;
1346  short ioWDVRefNum;
1347  short filler2[7];
1348  long ioWDDirID;
1349  };
1350  typedef struct WDPBRec WDPBRec;
1351  typedef WDPBRec *WDPBPtr;
1352  struct FCBPBRec
1353  {
1354  QElemPtr qLink;
1355  short qType;
1356  short ioTrap;
1357  Ptr ioCmdAddr;
1358  IOCompletionUPP ioCompletion;
1359  volatile OSErr ioResult;
1360  StringPtr ioNamePtr;
1361  short ioVRefNum;
1362  short ioRefNum;
1363  short filler;
1364  short ioFCBIndx;
1365  short filler1;
1366  long ioFCBFlNm;
1367  short ioFCBFlags;
1368  unsigned short ioFCBStBlk;
1369  long ioFCBEOF;
1370  long ioFCBPLen;
1371  long ioFCBCrPs;
1372  short ioFCBVRefNum;
1373  long ioFCBClpSiz;
1374  long ioFCBParID;
1375  };
1376  typedef struct FCBPBRec FCBPBRec;
1377  typedef FCBPBRec *FCBPBPtr;
1378  struct VCB
1379  {
1380  QElemPtr qLink;
1381  short qType;
1382  short vcbFlags;
1383  unsigned short vcbSigWord;
1384  unsigned long vcbCrDate;
1385  unsigned long vcbLsMod;
1386  short vcbAtrb;
1387  unsigned short vcbNmFls;
1388  short vcbVBMSt;
1389  short vcbAllocPtr;
1390  unsigned short vcbNmAlBlks;
1391  long vcbAlBlkSiz;
1392  long vcbClpSiz;
1393  short vcbAlBlSt;
1394  long vcbNxtCNID;
1395  unsigned short vcbFreeBks;
1396  Str27 vcbVN;
1397  short vcbDrvNum;
1398  short vcbDRefNum;
1399  short vcbFSID;
1400  short vcbVRefNum;
1401  Ptr vcbMAdr;
1402  Ptr vcbBufAdr;
1403  short vcbMLen;
1404  short vcbDirIndex;
1405  short vcbDirBlk;
1406  unsigned long vcbVolBkUp;
1407  unsigned short vcbVSeqNum;
1408  long vcbWrCnt;
1409  long vcbXTClpSiz;
1410  long vcbCTClpSiz;
1411  unsigned short vcbNmRtDirs;
1412  long vcbFilCnt;
1413  long vcbDirCnt;
1414  long vcbFndrInfo[8];
1415  unsigned short vcbVCSize;
1416  unsigned short vcbVBMCSiz;
1417  unsigned short vcbCtlCSiz;
1418  unsigned short vcbXTAlBlks;
1419  unsigned short vcbCTAlBlks;
1420  short vcbXTRef;
1421  short vcbCTRef;
1422  Ptr vcbCtlBuf;
1423  long vcbDirIDM;
1424  short vcbOffsM;
1425  };
1426  typedef struct VCB VCB;
1427  typedef VCB *VCBPtr;
1428  struct DrvQEl
1429  {
1430  QElemPtr qLink;
1431  short qType;
1432  short dQDrive;
1433  short dQRefNum;
1434  short dQFSID;
1435  unsigned short dQDrvSz;
1436  unsigned short dQDrvSz2;
1437  };
1438  typedef struct DrvQEl DrvQEl;
1439  typedef DrvQEl *DrvQElPtr;
1448  IOCompletionUPP
1449  NewIOCompletionUPP(IOCompletionProcPtr userRoutine);
1450 #if !OPAQUE_UPP_TYPES
1451  enum
1452  {
1453  uppIOCompletionProcInfo = 0x00009802
1454  }; /* register no_return_value Func(4_bytes:A0) */
1455 #ifdef __cplusplus
1456  inline IOCompletionUPP NewIOCompletionUPP(IOCompletionProcPtr userRoutine)
1457  {
1458  return (IOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1459  uppIOCompletionProcInfo,
1460  GetCurrentArchitecture());
1461  }
1462 #else
1463 #define NewIOCompletionUPP(userRoutine) \
1464  (IOCompletionUPP) \
1465  NewRoutineDescriptor((ProcPtr)(userRoutine), uppIOCompletionProcInfo, \
1466  GetCurrentArchitecture())
1467 #endif
1468 #endif
1469 
1478  void
1479  DisposeIOCompletionUPP(IOCompletionUPP userUPP);
1480 #if !OPAQUE_UPP_TYPES
1481 #ifdef __cplusplus
1482  inline void DisposeIOCompletionUPP(IOCompletionUPP userUPP)
1483  {
1484  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1485  }
1486 #else
1487 #define DisposeIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1488 #endif
1489 #endif
1490 
1499 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1500 #pragma parameter InvokeIOCompletionUPP(__A0, __A1)
1501 #endif
1502  void
1503  InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP);
1504 #if !OPAQUE_UPP_TYPES && \
1505  (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
1506 #ifdef __cplusplus
1507  inline void InvokeIOCompletionUPP(ParmBlkPtr paramBlock,
1508  IOCompletionUPP userUPP)
1509  {
1510  CALL_ONE_PARAMETER_UPP(userUPP, uppIOCompletionProcInfo, paramBlock);
1511  }
1512 #else
1513 #define InvokeIOCompletionUPP(paramBlock, userUPP) \
1514  CALL_ONE_PARAMETER_UPP((userUPP), uppIOCompletionProcInfo, (paramBlock))
1515 #endif
1516 #endif
1517 
1518 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1519 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1520 #define NewIOCompletionProc(userRoutine) NewIOCompletionUPP(userRoutine)
1521 #define CallIOCompletionProc(userRoutine, paramBlock) \
1522  InvokeIOCompletionUPP(paramBlock, userRoutine)
1523 #endif /* CALL_NOT_IN_CARBON */
1524 
1532 #if CALL_NOT_IN_CARBON
1541 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1542 #pragma parameter __D0 PBGetVInfoSync(__A0)
1543 #endif
1544  OSErr
1546 
1555 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1556 #pragma parameter __D0 PBGetVInfoAsync(__A0)
1557 #endif
1558  OSErr
1560 
1561 #endif /* CALL_NOT_IN_CARBON */
1562 
1571 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1572 #pragma parameter __D0 PBXGetVolInfoSync(__A0)
1573 #endif
1574  OSErr
1575  PBXGetVolInfoSync(XVolumeParamPtr paramBlock);
1576 
1585 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1586 #pragma parameter __D0 PBXGetVolInfoAsync(__A0)
1587 #endif
1588  OSErr
1589  PBXGetVolInfoAsync(XVolumeParamPtr paramBlock);
1590 
1591 #if CALL_NOT_IN_CARBON
1600 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1601 #pragma parameter __D0 PBGetVolSync(__A0)
1602 #endif
1603  OSErr
1605 
1614 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1615 #pragma parameter __D0 PBGetVolAsync(__A0)
1616 #endif
1617  OSErr
1619 
1628 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1629 #pragma parameter __D0 PBSetVolSync(__A0)
1630 #endif
1631  OSErr
1633 
1642 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1643 #pragma parameter __D0 PBSetVolAsync(__A0)
1644 #endif
1645  OSErr
1647 
1648 #endif /* CALL_NOT_IN_CARBON */
1649 
1658 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1659 #pragma parameter __D0 PBFlushVolSync(__A0)
1660 #endif
1661  OSErr
1663 
1672 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1673 #pragma parameter __D0 PBFlushVolAsync(__A0)
1674 #endif
1675  OSErr
1677 
1678 #if CALL_NOT_IN_CARBON
1687 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1688 #pragma parameter __D0 PBHTrashVolumeCachesSync(__A0)
1689 #endif
1690  OSErr
1692 
1701 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1702 #pragma parameter __D0 PBCreateSync(__A0)
1703 #endif
1704  OSErr
1706 
1715 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1716 #pragma parameter __D0 PBCreateAsync(__A0)
1717 #endif
1718  OSErr
1720 
1729 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1730 #pragma parameter __D0 PBDeleteSync(__A0)
1731 #endif
1732  OSErr
1734 
1743 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1744 #pragma parameter __D0 PBDeleteAsync(__A0)
1745 #endif
1746  OSErr
1748 
1757 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1758 #pragma parameter __D0 PBOpenDFSync(__A0)
1759 #endif
1760  OSErr
1762 
1771 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1772 #pragma parameter __D0 PBOpenDFAsync(__A0)
1773 #endif
1774  OSErr
1776 
1785 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1786 #pragma parameter __D0 PBOpenRFSync(__A0)
1787 #endif
1788  OSErr
1790 
1799 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1800 #pragma parameter __D0 PBOpenRFAsync(__A0)
1801 #endif
1802  OSErr
1804 
1813 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1814 #pragma parameter __D0 PBRenameSync(__A0)
1815 #endif
1816  OSErr
1818 
1827 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1828 #pragma parameter __D0 PBRenameAsync(__A0)
1829 #endif
1830  OSErr
1832 
1841 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1842 #pragma parameter __D0 PBGetFInfoSync(__A0)
1843 #endif
1844  OSErr
1846 
1855 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1856 #pragma parameter __D0 PBGetFInfoAsync(__A0)
1857 #endif
1858  OSErr
1860 
1869 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1870 #pragma parameter __D0 PBSetFInfoSync(__A0)
1871 #endif
1872  OSErr
1874 
1883 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1884 #pragma parameter __D0 PBSetFInfoAsync(__A0)
1885 #endif
1886  OSErr
1888 
1897 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1898 #pragma parameter __D0 PBSetFLockSync(__A0)
1899 #endif
1900  OSErr
1902 
1911 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1912 #pragma parameter __D0 PBSetFLockAsync(__A0)
1913 #endif
1914  OSErr
1916 
1925 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1926 #pragma parameter __D0 PBRstFLockSync(__A0)
1927 #endif
1928  OSErr
1930 
1939 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1940 #pragma parameter __D0 PBRstFLockAsync(__A0)
1941 #endif
1942  OSErr
1944 
1953 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1954 #pragma parameter __D0 PBSetFVersSync(__A0)
1955 #endif
1956  OSErr
1958 
1967 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1968 #pragma parameter __D0 PBSetFVersAsync(__A0)
1969 #endif
1970  OSErr
1972 
1973 #endif /* CALL_NOT_IN_CARBON */
1974 
1983 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1984 #pragma parameter __D0 PBAllocateSync(__A0)
1985 #endif
1986  OSErr
1988 
1997 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1998 #pragma parameter __D0 PBAllocateAsync(__A0)
1999 #endif
2000  OSErr
2002 
2011 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2012 #pragma parameter __D0 PBGetEOFSync(__A0)
2013 #endif
2014  OSErr
2016 
2025 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2026 #pragma parameter __D0 PBGetEOFAsync(__A0)
2027 #endif
2028  OSErr
2030 
2039 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2040 #pragma parameter __D0 PBSetEOFSync(__A0)
2041 #endif
2042  OSErr
2044 
2053 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2054 #pragma parameter __D0 PBSetEOFAsync(__A0)
2055 #endif
2056  OSErr
2058 
2067 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2068 #pragma parameter __D0 PBGetFPosSync(__A0)
2069 #endif
2070  OSErr
2072 
2081 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2082 #pragma parameter __D0 PBGetFPosAsync(__A0)
2083 #endif
2084  OSErr
2086 
2095 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2096 #pragma parameter __D0 PBSetFPosSync(__A0)
2097 #endif
2098  OSErr
2100 
2109 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2110 #pragma parameter __D0 PBSetFPosAsync(__A0)
2111 #endif
2112  OSErr
2114 
2123 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2124 #pragma parameter __D0 PBFlushFileSync(__A0)
2125 #endif
2126  OSErr
2128 
2137 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2138 #pragma parameter __D0 PBFlushFileAsync(__A0)
2139 #endif
2140  OSErr
2142 
2143 #if CALL_NOT_IN_CARBON
2152 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2153 #pragma parameter __D0 PBMountVol(__A0)
2154 #endif
2155  OSErr
2156  PBMountVol(ParmBlkPtr paramBlock);
2157 
2158 #endif /* CALL_NOT_IN_CARBON */
2159 
2205 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2206 #pragma parameter __D0 PBUnmountVol(__A0)
2207 #endif
2208  OSErr
2210 
2211 #if CALL_NOT_IN_CARBON
2220 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2221 #pragma parameter __D0 PBUnmountVolImmed(__A0)
2222 #endif
2223  OSErr
2225 
2234 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2235 #pragma parameter __D0 PBEject(__A0)
2236 #endif
2237  OSErr
2238  PBEject(ParmBlkPtr paramBlock);
2239 
2248 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2249 #pragma parameter __D0 PBOffLine(__A0)
2250 #endif
2251  OSErr
2252  PBOffLine(ParmBlkPtr paramBlock);
2253 
2254 #endif /* CALL_NOT_IN_CARBON */
2255 
2264 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2265 #pragma parameter __D0 PBCatSearchSync(__A0)
2266 #endif
2267  OSErr
2268  PBCatSearchSync(CSParamPtr paramBlock);
2269 
2278 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
2279 #pragma parameter __D0 PBCatSearchAsync(__A0)
2280 #endif
2281  OSErr
2282  PBCatSearchAsync(CSParamPtr paramBlock);
2283 
2284 #if CALL_NOT_IN_CARBON
2285 
2312  err = SetVol("\pMy HardDisk:", 0); /* set by name */
2313  The volName string should NOT be a multiple - name pathname(such as
2314  "\pHardDisk:Ltrs:Old") nor should it be an empty string(i.e., "\p");
2315  this parameter is checked first and anything but a valid name(except a NIL
2316  pointer) is rejected as an error.PBHSetVol lets you select both the default volume and default directory(see the second example, below)
2317  .You can pass a working directory number(i.e., the value of ioVRefNum after a call to PBOpenWD, or a volume reference returned by Standard
2318  File),
2319  but only if volName is NIL on entry(see the third example).Also, if you do use a working directory reference, a subsequent call to GetVol will return that number, rather than a "hard" volume ID.</ pre> * \copyright THINK Reference © 1991 - 1992 Symantec Corporation * \non_carbon_cfm in InterfaceLib 7.1 and later * \carbon_lib not available * \mac_os_x not available * / OSErr SetVol(ConstStr63Param volName, /* can be NULL */
2320  short vRefNum);
2321 
2322 #endif /* CALL_NOT_IN_CARBON */
2323 
2342  OSErr
2343  UnmountVol(ConstStr63Param volName, /* can be NULL */
2344  short vRefNum);
2345 
2346 #if CALL_NOT_IN_CARBON
2355  OSErr
2356  Eject(ConstStr63Param volName, /* can be NULL */
2357  short vRefNum);
2358 
2359 #endif /* CALL_NOT_IN_CARBON */
2360 
2369  OSErr
2370  FlushVol(ConstStr63Param volName, /* can be NULL */
2371  short vRefNum);
2372 
2419  OSErr
2420  HSetVol(ConstStr63Param volName, /* can be NULL */
2421  short vRefNum, long dirID);
2422 
2423  /* AddDrive() was moved to Devices.h*/
2424 
2425 #if CALL_NOT_IN_CARBON
2426 
2475  OSErr
2476  FSOpen(ConstStr255Param fileName, short vRefNum, short *refNum);
2477 
2486  OSErr
2487  OpenDF(ConstStr255Param fileName, short vRefNum, short *refNum);
2488 
2489 #endif /* CALL_NOT_IN_CARBON */
2490 
2524  OSErr
2525  FSClose(short refNum);
2526 
2573  OSErr
2574  FSRead(short refNum, long *count, void *buffPtr);
2575 
2623  OSErr
2624  FSWrite(short refNum, long *count, const void *buffPtr);
2625 
2626 #if CALL_NOT_IN_CARBON
2627 
2663  Str255 volName;
2664  short vRef, rc;
2665  long avail;
2666  </ pre>
2667  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
2668  * \non_carbon_cfm in InterfaceLib 7.1 and
2669  later
2670  * \carbon_lib not available * \mac_os_x not available *
2671  /
2672  OSErr
2673  GetVInfo(short drvNum, StringPtr volName, short *vRefNum, long *freeBytes);
2674 
2724  OSErr
2725  GetFInfo(ConstStr255Param fileName, short vRefNum, FInfo *fndrInfo);
2726 
2770  OSErr
2771  GetVol(StringPtr volName, short *vRefNum);
2772 
2821  OSErr
2822  Create(ConstStr255Param fileName, short vRefNum, OSType creator,
2823  OSType fileType);
2824 
2861  if (rc)
2862  { /* . . . handle the error . . . */
2863  }
2864  rc = FSDelete("\pHardDisk:Ltrs:", 0); /* delete directory */
2865  if (rc)
2866  { /* . . . handle the error . . . */
2867  }
2868  </ pre>
2869  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
2870  * \non_carbon_cfm in InterfaceLib 7.1 and
2871  later
2872  * \carbon_lib not available * \mac_os_x not available *
2873  /
2874  OSErr
2875  FSDelete(ConstStr255Param fileName, short vRefNum);
2876 
2885  OSErr
2886  OpenRF(ConstStr255Param fileName, short vRefNum, short *refNum);
2887 
2937  OSErr
2938  Rename(ConstStr255Param oldName, short vRefNum, ConstStr255Param newName);
2939 
2987  OSErr
2988  SetFInfo(ConstStr255Param fileName, short vRefNum, const FInfo *fndrInfo);
2989 
3034  OSErr
3035  SetFLock(ConstStr255Param fileName, short vRefNum);
3036 
3075  OSErr
3076  RstFLock(ConstStr255Param fileName, short vRefNum);
3077 
3078 #endif /* CALL_NOT_IN_CARBON */
3079 
3115 This attempts to extend the file by 1 byte, but it will always eat up one full
3116 allocation unit (e.g., 512 or 1K) of disk space. Before using Allocate , you
3117 may wish to learn the current physical file length by examining the
3118 ioFlPyLen field of the FileParam structure returned by PBGetFInfo .
3119 The PBAllocContig attempts to expand a file by adding contiguous disk
3120 blocks to the file (for fastest I/O) SetEOF can also be used to increase file
3121 size.
3122 </pre>
3123  * \copyright THINK Reference © 1991-1992 Symantec Corporation
3124  * \non_carbon_cfm in InterfaceLib 7.1 and later
3125  * \carbon_lib in CarbonLib 1.0 and later
3126  * \mac_os_x in version 10.0 and later
3127  */
3128 OSErr
3129 Allocate(short refNum, long *count);
3130 
3162 rc = FSOpen("\pHardDisk:MyFile", 0, &fRef);
3163 if (rc)
3164 { /* . . . handle the error . . . */
3165 }
3166 rc = GetEOF(fRef, &fileSize); /* get file size */
3167 if (rc)
3168 { /* . . . handle the error . . . */
3169 }
3170 hData = NewHandle(fileSize); /* allocate enough RAM */
3171 if (hData == 0)
3172 { /* . . . handle the error . . . */
3173 }
3174 rc = FSRead(fRef, &fileSize, *hData); /* read it in */
3175 </ pre>
3176  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
3177  * \non_carbon_cfm in InterfaceLib 7.1 and
3178  later
3179  * \carbon_lib in CarbonLib 1.0 and
3180  later
3181  * \mac_os_x in version 10.0 and
3182  later
3183  * /
3184  OSErr
3185  GetEOF(short refNum, long *logEOF);
3186 
3226 OSErr SetEOF(short refNum, long logEOF);
3227 
3258 OSErr GetFPos(short refNum, long *filePos);
3259 
3307 OSErr SetFPos(short refNum, short posMode, long posOff);
3308 
3332 OSErr GetVRefNum(short fileRefNum, short *vRefNum);
3333 
3334 #if CALL_NOT_IN_CARBON
3343 OSErr fsopen(const char *fileName, short vRefNum, short *refNum);
3344 
3353 OSErr getvinfo(short drvNum, char *volName, short *vRefNum, long *freeBytes);
3354 
3363 OSErr getfinfo(const char *fileName, short vRefNum, FInfo *fndrInfo);
3364 
3373 OSErr getvol(char *volName, short *vRefNum);
3374 
3383 OSErr setvol(const char *volName, short vRefNum);
3384 
3393 OSErr unmountvol(const char *volName, short vRefNum);
3394 
3403 OSErr eject(const char *volName, short vRefNum);
3404 
3413 OSErr flushvol(const char *volName, short vRefNum);
3414 
3423 OSErr create(const char *fileName, short vRefNum, OSType creator, OSType fileType);
3424 
3433 OSErr fsdelete(const char *fileName, short vRefNum);
3434 
3443 OSErr openrf(const char *fileName, short vRefNum, short *refNum);
3444 
3453 OSErr fsrename(const char *oldName, short vRefNum, const char *newName);
3454 
3463 OSErr setfinfo(const char *fileName, short vRefNum, const FInfo *fndrInfo);
3464 
3473 OSErr setflock(const char *fileName, short vRefNum);
3474 
3483 OSErr rstflock(const char *fileName, short vRefNum);
3484 
3485 #endif /* CALL_NOT_IN_CARBON */
3486 
3487 #if CALL_NOT_IN_CARBON
3496 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3497 #pragma parameter __D0 PBOpenWDSync(__A0)
3498 #endif
3499  OSErr
3500  PBOpenWDSync(WDPBPtr paramBlock);
3501 
3510 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3511 #pragma parameter __D0 PBOpenWDAsync(__A0)
3512 #endif
3513  OSErr
3514  PBOpenWDAsync(WDPBPtr paramBlock);
3515 
3524 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3525 #pragma parameter __D0 PBCloseWDSync(__A0)
3526 #endif
3527  OSErr
3528  PBCloseWDSync(WDPBPtr paramBlock);
3529 
3538 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3539 #pragma parameter __D0 PBCloseWDAsync(__A0)
3540 #endif
3541  OSErr
3543 
3544 #endif /* CALL_NOT_IN_CARBON */
3545 
3554 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3555 #pragma parameter __D0 PBHSetVolSync(__A0)
3556 #endif
3557  OSErr
3558  PBHSetVolSync(WDPBPtr paramBlock);
3559 
3568 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3569 #pragma parameter __D0 PBHSetVolAsync(__A0)
3570 #endif
3571  OSErr
3573 
3582 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3583 #pragma parameter __D0 PBHGetVolSync(__A0)
3584 #endif
3585  OSErr
3586  PBHGetVolSync(WDPBPtr paramBlock);
3587 
3596 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3597 #pragma parameter __D0 PBHGetVolAsync(__A0)
3598 #endif
3599  OSErr
3601 
3610 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3611 #pragma parameter __D0 PBCatMoveSync(__A0)
3612 #endif
3613  OSErr
3615 
3624 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3625 #pragma parameter __D0 PBCatMoveAsync(__A0)
3626 #endif
3627  OSErr
3629 
3638 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3639 #pragma parameter __D0 PBDirCreateSync(__A0)
3640 #endif
3641  OSErr
3642  PBDirCreateSync(HParmBlkPtr paramBlock);
3643 
3652 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3653 #pragma parameter __D0 PBDirCreateAsync(__A0)
3654 #endif
3655  OSErr
3656  PBDirCreateAsync(HParmBlkPtr paramBlock);
3657 
3658 #if CALL_NOT_IN_CARBON
3667 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3668 #pragma parameter __D0 PBGetWDInfoSync(__A0)
3669 #endif
3670  OSErr
3672 
3681 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3682 #pragma parameter __D0 PBGetWDInfoAsync(__A0)
3683 #endif
3684  OSErr
3686 
3687 #endif /* CALL_NOT_IN_CARBON */
3688 
3697 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3698 #pragma parameter __D0 PBGetFCBInfoSync(__A0)
3699 #endif
3700  OSErr
3702 
3711 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3712 #pragma parameter __D0 PBGetFCBInfoAsync(__A0)
3713 #endif
3714  OSErr
3716 
3725 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3726 #pragma parameter __D0 PBGetCatInfoSync(__A0)
3727 #endif
3728  OSErr
3729  PBGetCatInfoSync(CInfoPBPtr paramBlock);
3730 
3739 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3740 #pragma parameter __D0 PBGetCatInfoAsync(__A0)
3741 #endif
3742  OSErr
3743  PBGetCatInfoAsync(CInfoPBPtr paramBlock);
3744 
3753 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3754 #pragma parameter __D0 PBSetCatInfoSync(__A0)
3755 #endif
3756  OSErr
3757  PBSetCatInfoSync(CInfoPBPtr paramBlock);
3758 
3767 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3768 #pragma parameter __D0 PBSetCatInfoAsync(__A0)
3769 #endif
3770  OSErr
3771  PBSetCatInfoAsync(CInfoPBPtr paramBlock);
3772 
3781 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3782 #pragma parameter __D0 PBAllocContigSync(__A0)
3783 #endif
3784  OSErr
3786 
3795 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3796 #pragma parameter __D0 PBAllocContigAsync(__A0)
3797 #endif
3798  OSErr
3800 
3809 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3810 #pragma parameter __D0 PBLockRangeSync(__A0)
3811 #endif
3812  OSErr
3814 
3823 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3824 #pragma parameter __D0 PBLockRangeAsync(__A0)
3825 #endif
3826  OSErr
3828 
3837 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3838 #pragma parameter __D0 PBUnlockRangeSync(__A0)
3839 #endif
3840  OSErr
3842 
3851 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3852 #pragma parameter __D0 PBUnlockRangeAsync(__A0)
3853 #endif
3854  OSErr
3856 
3865 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3866 #pragma parameter __D0 PBSetVInfoSync(__A0)
3867 #endif
3868  OSErr
3869  PBSetVInfoSync(HParmBlkPtr paramBlock);
3870 
3879 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3880 #pragma parameter __D0 PBSetVInfoAsync(__A0)
3881 #endif
3882  OSErr
3883  PBSetVInfoAsync(HParmBlkPtr paramBlock);
3884 
3893 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3894 #pragma parameter __D0 PBHGetVInfoSync(__A0)
3895 #endif
3896  OSErr
3897  PBHGetVInfoSync(HParmBlkPtr paramBlock);
3898 
3907 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3908 #pragma parameter __D0 PBHGetVInfoAsync(__A0)
3909 #endif
3910  OSErr
3911  PBHGetVInfoAsync(HParmBlkPtr paramBlock);
3912 
3921 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3922 #pragma parameter __D0 PBHOpenSync(__A0)
3923 #endif
3924  OSErr
3925  PBHOpenSync(HParmBlkPtr paramBlock);
3926 
3935 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3936 #pragma parameter __D0 PBHOpenAsync(__A0)
3937 #endif
3938  OSErr
3939  PBHOpenAsync(HParmBlkPtr paramBlock);
3940 
3949 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3950 #pragma parameter __D0 PBHOpenRFSync(__A0)
3951 #endif
3952  OSErr
3953  PBHOpenRFSync(HParmBlkPtr paramBlock);
3954 
3963 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3964 #pragma parameter __D0 PBHOpenRFAsync(__A0)
3965 #endif
3966  OSErr
3967  PBHOpenRFAsync(HParmBlkPtr paramBlock);
3968 
3977 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3978 #pragma parameter __D0 PBHOpenDFSync(__A0)
3979 #endif
3980  OSErr
3981  PBHOpenDFSync(HParmBlkPtr paramBlock);
3982 
3991 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
3992 #pragma parameter __D0 PBHOpenDFAsync(__A0)
3993 #endif
3994  OSErr
3995  PBHOpenDFAsync(HParmBlkPtr paramBlock);
3996 
4005 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4006 #pragma parameter __D0 PBHCreateSync(__A0)
4007 #endif
4008  OSErr
4009  PBHCreateSync(HParmBlkPtr paramBlock);
4010 
4019 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4020 #pragma parameter __D0 PBHCreateAsync(__A0)
4021 #endif
4022  OSErr
4023  PBHCreateAsync(HParmBlkPtr paramBlock);
4024 
4033 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4034 #pragma parameter __D0 PBHDeleteSync(__A0)
4035 #endif
4036  OSErr
4037  PBHDeleteSync(HParmBlkPtr paramBlock);
4038 
4047 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4048 #pragma parameter __D0 PBHDeleteAsync(__A0)
4049 #endif
4050  OSErr
4051  PBHDeleteAsync(HParmBlkPtr paramBlock);
4052 
4061 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4062 #pragma parameter __D0 PBHRenameSync(__A0)
4063 #endif
4064  OSErr
4065  PBHRenameSync(HParmBlkPtr paramBlock);
4066 
4075 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4076 #pragma parameter __D0 PBHRenameAsync(__A0)
4077 #endif
4078  OSErr
4079  PBHRenameAsync(HParmBlkPtr paramBlock);
4080 
4089 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4090 #pragma parameter __D0 PBHRstFLockSync(__A0)
4091 #endif
4092  OSErr
4093  PBHRstFLockSync(HParmBlkPtr paramBlock);
4094 
4103 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4104 #pragma parameter __D0 PBHRstFLockAsync(__A0)
4105 #endif
4106  OSErr
4107  PBHRstFLockAsync(HParmBlkPtr paramBlock);
4108 
4117 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4118 #pragma parameter __D0 PBHSetFLockSync(__A0)
4119 #endif
4120  OSErr
4121  PBHSetFLockSync(HParmBlkPtr paramBlock);
4122 
4131 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4132 #pragma parameter __D0 PBHSetFLockAsync(__A0)
4133 #endif
4134  OSErr
4135  PBHSetFLockAsync(HParmBlkPtr paramBlock);
4136 
4145 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4146 #pragma parameter __D0 PBHGetFInfoSync(__A0)
4147 #endif
4148  OSErr
4149  PBHGetFInfoSync(HParmBlkPtr paramBlock);
4150 
4159 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4160 #pragma parameter __D0 PBHGetFInfoAsync(__A0)
4161 #endif
4162  OSErr
4163  PBHGetFInfoAsync(HParmBlkPtr paramBlock);
4164 
4173 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4174 #pragma parameter __D0 PBHSetFInfoSync(__A0)
4175 #endif
4176  OSErr
4177  PBHSetFInfoSync(HParmBlkPtr paramBlock);
4178 
4187 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4188 #pragma parameter __D0 PBHSetFInfoAsync(__A0)
4189 #endif
4190  OSErr
4191  PBHSetFInfoAsync(HParmBlkPtr paramBlock);
4192 
4201 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4202 #pragma parameter __D0 PBMakeFSSpecSync(__A0)
4203 #endif
4204  OSErr
4205  PBMakeFSSpecSync(HParmBlkPtr paramBlock);
4206 
4215 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4216 #pragma parameter __D0 PBMakeFSSpecAsync(__A0)
4217 #endif
4218  OSErr
4219  PBMakeFSSpecAsync(HParmBlkPtr paramBlock);
4220 
4221 #if CALL_NOT_IN_CARBON
4222 
4240  void
4241  FInitQueue(void);
4242 
4243 #endif /* CALL_NOT_IN_CARBON */
4244 
4245 #if CALL_NOT_IN_CARBON
4246 
4276  QHdrPtr
4277  GetFSQHdr(void);
4278 
4310  printf("First vcb is at = %lx\n", qhp->qHead);
4311  vcbp = (VCB *)qhp->qHead; /* address of a queue element */
4312  printf("Volume's drive # is: %d\n", vcbp->vcbDrvNum);
4313  printf("number of files in root = %d\n", vcbp->vcbNmFls);
4314  printf("Next vcb is at = %lx\n", vcbp->qLink); /* 0 means no more */
4315  </ pre>
4316  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
4317  * \non_carbon_cfm in InterfaceLib 7.1 and
4318  later
4319  * \carbon_lib not available * \mac_os_x not available *
4320  /
4321  QHdrPtr
4322  GetVCBQHdr(void);
4323 
4324  /* GetDrvQHdr was moved to Devices.h*/
4325 
4326 #endif /* CALL_NOT_IN_CARBON */
4327 
4350  OSErr
4351  HGetVol(StringPtr volName, short *vRefNum, long *dirID);
4352 
4361  OSErr
4362  HOpen(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission,
4363  short *refNum);
4364 
4373  OSErr
4374  HOpenDF(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission,
4375  short *refNum);
4376 
4385  OSErr
4386  HOpenRF(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission,
4387  short *refNum);
4388 
4417  OSErr
4418  AllocContig(short refNum, long *count);
4419 
4465  OSErr
4466  HCreate(short vRefNum, long dirID, ConstStr255Param fileName, OSType creator,
4467  OSType fileType);
4468 
4500  OSErr
4501  DirCreate(short vRefNum, long parentDirID, ConstStr255Param directoryName,
4502  long *createdDirID);
4503 
4543  OSErr
4544  HDelete(short vRefNum, long dirID, ConstStr255Param fileName);
4545 
4589  OSErr
4590  HGetFInfo(short vRefNum, long dirID, ConstStr255Param fileName,
4591  FInfo *fndrInfo);
4592 
4636  OSErr
4637  HSetFInfo(short vRefNum, long dirID, ConstStr255Param fileName,
4638  const FInfo *fndrInfo);
4639 
4687  OSErr
4688  HSetFLock(short vRefNum, long dirID, ConstStr255Param fileName);
4689 
4729  OSErr
4730  HRstFLock(short vRefNum, long dirID, ConstStr255Param fileName);
4731 
4760  OSErr
4761  HRename(short vRefNum, long dirID, ConstStr255Param oldName,
4762  ConstStr255Param newName);
4763 
4796  OSErr
4797  CatMove(short vRefNum, long dirID, ConstStr255Param oldName, long newDirID,
4798  ConstStr255Param newName);
4799 
4800 #if CALL_NOT_IN_CARBON
4809  OSErr
4810  OpenWD(short vRefNum, long dirID, long procID, short *wdRefNum);
4811 
4830  OSErr
4831  CloseWD(short wdRefNum);
4832 
4848  OSErr
4849  GetWDInfo(short wdRefNum, short *vRefNum, long *dirID, long *procID);
4850 
4851 /* shared environment */
4852 #endif /* CALL_NOT_IN_CARBON */
4853 
4862 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4863 #pragma parameter __D0 PBHGetVolParmsSync(__A0)
4864 #endif
4865  OSErr
4866  PBHGetVolParmsSync(HParmBlkPtr paramBlock);
4867 
4876 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4877 #pragma parameter __D0 PBHGetVolParmsAsync(__A0)
4878 #endif
4879  OSErr
4880  PBHGetVolParmsAsync(HParmBlkPtr paramBlock);
4881 
4890 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4891 #pragma parameter __D0 PBHGetLogInInfoSync(__A0)
4892 #endif
4893  OSErr
4894  PBHGetLogInInfoSync(HParmBlkPtr paramBlock);
4895 
4904 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4905 #pragma parameter __D0 PBHGetLogInInfoAsync(__A0)
4906 #endif
4907  OSErr
4908  PBHGetLogInInfoAsync(HParmBlkPtr paramBlock);
4909 
4918 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4919 #pragma parameter __D0 PBHGetDirAccessSync(__A0)
4920 #endif
4921  OSErr
4922  PBHGetDirAccessSync(HParmBlkPtr paramBlock);
4923 
4932 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4933 #pragma parameter __D0 PBHGetDirAccessAsync(__A0)
4934 #endif
4935  OSErr
4936  PBHGetDirAccessAsync(HParmBlkPtr paramBlock);
4937 
4946 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4947 #pragma parameter __D0 PBHSetDirAccessSync(__A0)
4948 #endif
4949  OSErr
4950  PBHSetDirAccessSync(HParmBlkPtr paramBlock);
4951 
4960 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4961 #pragma parameter __D0 PBHSetDirAccessAsync(__A0)
4962 #endif
4963  OSErr
4964  PBHSetDirAccessAsync(HParmBlkPtr paramBlock);
4965 
4974 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4975 #pragma parameter __D0 PBHMapIDSync(__A0)
4976 #endif
4977  OSErr
4978  PBHMapIDSync(HParmBlkPtr paramBlock);
4979 
4988 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
4989 #pragma parameter __D0 PBHMapIDAsync(__A0)
4990 #endif
4991  OSErr
4992  PBHMapIDAsync(HParmBlkPtr paramBlock);
4993 
5002 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5003 #pragma parameter __D0 PBHMapNameSync(__A0)
5004 #endif
5005  OSErr
5006  PBHMapNameSync(HParmBlkPtr paramBlock);
5007 
5016 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5017 #pragma parameter __D0 PBHMapNameAsync(__A0)
5018 #endif
5019  OSErr
5020  PBHMapNameAsync(HParmBlkPtr paramBlock);
5021 
5030 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5031 #pragma parameter __D0 PBHCopyFileSync(__A0)
5032 #endif
5033  OSErr
5034  PBHCopyFileSync(HParmBlkPtr paramBlock);
5035 
5044 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5045 #pragma parameter __D0 PBHCopyFileAsync(__A0)
5046 #endif
5047  OSErr
5048  PBHCopyFileAsync(HParmBlkPtr paramBlock);
5049 
5058 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5059 #pragma parameter __D0 PBHMoveRenameSync(__A0)
5060 #endif
5061  OSErr
5062  PBHMoveRenameSync(HParmBlkPtr paramBlock);
5063 
5072 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5073 #pragma parameter __D0 PBHMoveRenameAsync(__A0)
5074 #endif
5075  OSErr
5076  PBHMoveRenameAsync(HParmBlkPtr paramBlock);
5077 
5086 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5087 #pragma parameter __D0 PBHOpenDenySync(__A0)
5088 #endif
5089  OSErr
5090  PBHOpenDenySync(HParmBlkPtr paramBlock);
5091 
5100 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5101 #pragma parameter __D0 PBHOpenDenyAsync(__A0)
5102 #endif
5103  OSErr
5104  PBHOpenDenyAsync(HParmBlkPtr paramBlock);
5105 
5114 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5115 #pragma parameter __D0 PBHOpenRFDenySync(__A0)
5116 #endif
5117  OSErr
5118  PBHOpenRFDenySync(HParmBlkPtr paramBlock);
5119 
5128 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5129 #pragma parameter __D0 PBHOpenRFDenyAsync(__A0)
5130 #endif
5131  OSErr
5132  PBHOpenRFDenyAsync(HParmBlkPtr paramBlock);
5133 
5142 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5143 #pragma parameter __D0 PBGetXCatInfoSync(__A0)
5144 #endif
5145  OSErr
5146  PBGetXCatInfoSync(XCInfoPBPtr paramBlock);
5147 
5156 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5157 #pragma parameter __D0 PBGetXCatInfoAsync(__A0)
5158 #endif
5159  OSErr
5160  PBGetXCatInfoAsync(XCInfoPBPtr paramBlock);
5161 
5170 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5171 #pragma parameter __D0 PBExchangeFilesSync(__A0)
5172 #endif
5173  OSErr
5174  PBExchangeFilesSync(HParmBlkPtr paramBlock);
5175 
5184 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5185 #pragma parameter __D0 PBExchangeFilesAsync(__A0)
5186 #endif
5187  OSErr
5188  PBExchangeFilesAsync(HParmBlkPtr paramBlock);
5189 
5198 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5199 #pragma parameter __D0 PBCreateFileIDRefSync(__A0)
5200 #endif
5201  OSErr
5202  PBCreateFileIDRefSync(HParmBlkPtr paramBlock);
5203 
5212 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5213 #pragma parameter __D0 PBCreateFileIDRefAsync(__A0)
5214 #endif
5215  OSErr
5216  PBCreateFileIDRefAsync(HParmBlkPtr paramBlock);
5217 
5226 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5227 #pragma parameter __D0 PBResolveFileIDRefSync(__A0)
5228 #endif
5229  OSErr
5230  PBResolveFileIDRefSync(HParmBlkPtr paramBlock);
5231 
5240 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5241 #pragma parameter __D0 PBResolveFileIDRefAsync(__A0)
5242 #endif
5243  OSErr
5244  PBResolveFileIDRefAsync(HParmBlkPtr paramBlock);
5245 
5254 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5255 #pragma parameter __D0 PBDeleteFileIDRefSync(__A0)
5256 #endif
5257  OSErr
5258  PBDeleteFileIDRefSync(HParmBlkPtr paramBlock);
5259 
5268 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5269 #pragma parameter __D0 PBDeleteFileIDRefAsync(__A0)
5270 #endif
5271  OSErr
5272  PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock);
5273 
5282 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5283 #pragma parameter __D0 PBGetForeignPrivsSync(__A0)
5284 #endif
5285  OSErr
5286  PBGetForeignPrivsSync(HParmBlkPtr paramBlock);
5287 
5296 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5297 #pragma parameter __D0 PBGetForeignPrivsAsync(__A0)
5298 #endif
5299  OSErr
5300  PBGetForeignPrivsAsync(HParmBlkPtr paramBlock);
5301 
5310 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5311 #pragma parameter __D0 PBSetForeignPrivsSync(__A0)
5312 #endif
5313  OSErr
5314  PBSetForeignPrivsSync(HParmBlkPtr paramBlock);
5315 
5324 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5325 #pragma parameter __D0 PBSetForeignPrivsAsync(__A0)
5326 #endif
5327  OSErr
5328  PBSetForeignPrivsAsync(HParmBlkPtr paramBlock);
5329 
5330 /* Desktop Manager */
5339 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5340 #pragma parameter __D0 PBDTGetPath(__A0)
5341 #endif
5342  OSErr
5343  PBDTGetPath(DTPBPtr paramBlock);
5344 
5353 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5354 #pragma parameter __D0 PBDTCloseDown(__A0)
5355 #endif
5356  OSErr
5357  PBDTCloseDown(DTPBPtr paramBlock);
5358 
5367 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5368 #pragma parameter __D0 PBDTAddIconSync(__A0)
5369 #endif
5370  OSErr
5371  PBDTAddIconSync(DTPBPtr paramBlock);
5372 
5381 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5382 #pragma parameter __D0 PBDTAddIconAsync(__A0)
5383 #endif
5384  OSErr
5385  PBDTAddIconAsync(DTPBPtr paramBlock);
5386 
5395 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5396 #pragma parameter __D0 PBDTGetIconSync(__A0)
5397 #endif
5398  OSErr
5399  PBDTGetIconSync(DTPBPtr paramBlock);
5400 
5409 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5410 #pragma parameter __D0 PBDTGetIconAsync(__A0)
5411 #endif
5412  OSErr
5413  PBDTGetIconAsync(DTPBPtr paramBlock);
5414 
5423 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5424 #pragma parameter __D0 PBDTGetIconInfoSync(__A0)
5425 #endif
5426  OSErr
5427  PBDTGetIconInfoSync(DTPBPtr paramBlock);
5428 
5437 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5438 #pragma parameter __D0 PBDTGetIconInfoAsync(__A0)
5439 #endif
5440  OSErr
5441  PBDTGetIconInfoAsync(DTPBPtr paramBlock);
5442 
5451 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5452 #pragma parameter __D0 PBDTAddAPPLSync(__A0)
5453 #endif
5454  OSErr
5455  PBDTAddAPPLSync(DTPBPtr paramBlock);
5456 
5465 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5466 #pragma parameter __D0 PBDTAddAPPLAsync(__A0)
5467 #endif
5468  OSErr
5469  PBDTAddAPPLAsync(DTPBPtr paramBlock);
5470 
5479 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5480 #pragma parameter __D0 PBDTRemoveAPPLSync(__A0)
5481 #endif
5482  OSErr
5483  PBDTRemoveAPPLSync(DTPBPtr paramBlock);
5484 
5493 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5494 #pragma parameter __D0 PBDTRemoveAPPLAsync(__A0)
5495 #endif
5496  OSErr
5497  PBDTRemoveAPPLAsync(DTPBPtr paramBlock);
5498 
5507 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5508 #pragma parameter __D0 PBDTGetAPPLSync(__A0)
5509 #endif
5510  OSErr
5511  PBDTGetAPPLSync(DTPBPtr paramBlock);
5512 
5521 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5522 #pragma parameter __D0 PBDTGetAPPLAsync(__A0)
5523 #endif
5524  OSErr
5525  PBDTGetAPPLAsync(DTPBPtr paramBlock);
5526 
5535 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5536 #pragma parameter __D0 PBDTSetCommentSync(__A0)
5537 #endif
5538  OSErr
5539  PBDTSetCommentSync(DTPBPtr paramBlock);
5540 
5549 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5550 #pragma parameter __D0 PBDTSetCommentAsync(__A0)
5551 #endif
5552  OSErr
5553  PBDTSetCommentAsync(DTPBPtr paramBlock);
5554 
5563 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5564 #pragma parameter __D0 PBDTRemoveCommentSync(__A0)
5565 #endif
5566  OSErr
5567  PBDTRemoveCommentSync(DTPBPtr paramBlock);
5568 
5577 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5578 #pragma parameter __D0 PBDTRemoveCommentAsync(__A0)
5579 #endif
5580  OSErr
5581  PBDTRemoveCommentAsync(DTPBPtr paramBlock);
5582 
5591 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5592 #pragma parameter __D0 PBDTGetCommentSync(__A0)
5593 #endif
5594  OSErr
5595  PBDTGetCommentSync(DTPBPtr paramBlock);
5596 
5605 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5606 #pragma parameter __D0 PBDTGetCommentAsync(__A0)
5607 #endif
5608  OSErr
5609  PBDTGetCommentAsync(DTPBPtr paramBlock);
5610 
5619 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5620 #pragma parameter __D0 PBDTFlushSync(__A0)
5621 #endif
5622  OSErr
5623  PBDTFlushSync(DTPBPtr paramBlock);
5624 
5633 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5634 #pragma parameter __D0 PBDTFlushAsync(__A0)
5635 #endif
5636  OSErr
5637  PBDTFlushAsync(DTPBPtr paramBlock);
5638 
5647 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5648 #pragma parameter __D0 PBDTResetSync(__A0)
5649 #endif
5650  OSErr
5651  PBDTResetSync(DTPBPtr paramBlock);
5652 
5661 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5662 #pragma parameter __D0 PBDTResetAsync(__A0)
5663 #endif
5664  OSErr
5665  PBDTResetAsync(DTPBPtr paramBlock);
5666 
5675 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5676 #pragma parameter __D0 PBDTGetInfoSync(__A0)
5677 #endif
5678  OSErr
5679  PBDTGetInfoSync(DTPBPtr paramBlock);
5680 
5689 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5690 #pragma parameter __D0 PBDTGetInfoAsync(__A0)
5691 #endif
5692  OSErr
5693  PBDTGetInfoAsync(DTPBPtr paramBlock);
5694 
5703 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5704 #pragma parameter __D0 PBDTOpenInform(__A0)
5705 #endif
5706  OSErr
5707  PBDTOpenInform(DTPBPtr paramBlock);
5708 
5717 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5718 #pragma parameter __D0 PBDTDeleteSync(__A0)
5719 #endif
5720  OSErr
5721  PBDTDeleteSync(DTPBPtr paramBlock);
5722 
5731 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5732 #pragma parameter __D0 PBDTDeleteAsync(__A0)
5733 #endif
5734  OSErr
5735  PBDTDeleteAsync(DTPBPtr paramBlock);
5736 
5737  /* VolumeMount traps */
5738 
5772 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5773 #pragma parameter __D0 PBGetVolMountInfoSize(__A0)
5774 #endif
5775  OSErr
5777 
5813 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5814 #pragma parameter __D0 PBGetVolMountInfo(__A0)
5815 #endif
5816  OSErr
5818 
5827 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
5828 #pragma parameter __D0 PBVolumeMount(__A0)
5829 #endif
5830  OSErr
5832 
5833  /* FSp traps */
5834 
5880  OSErr
5881  FSMakeFSSpec(short vRefNum, long dirID, ConstStr255Param fileName, FSSpec *spec);
5882 
5891  OSErr
5892  FSpOpenDF(const FSSpec *spec, SInt8 permission, short *refNum);
5893 
5902  OSErr
5903  FSpOpenRF(const FSSpec *spec, SInt8 permission, short *refNum);
5904 
5940  OSErr
5941  FSpCreate(const FSSpec *spec, OSType creator, OSType fileType,
5942  ScriptCode scriptTag);
5943 
5971  OSErr
5972  FSpDirCreate(const FSSpec *spec, ScriptCode scriptTag, long *createdDirID);
5973 
6001  OSErr
6002  FSpDelete(const FSSpec *spec);
6003 
6031  OSErr
6032  FSpGetFInfo(const FSSpec *spec, FInfo *fndrInfo);
6033 
6062  OSErr
6063  FSpSetFInfo(const FSSpec *spec, const FInfo *fndrInfo);
6064 
6088  OSErr
6089  FSpSetFLock(const FSSpec *spec);
6090 
6114  OSErr
6115  FSpRstFLock(const FSSpec *spec);
6116 
6146  OSErr
6147  FSpRename(const FSSpec *spec, ConstStr255Param newName);
6148 
6180  OSErr
6181  FSpCatMove(const FSSpec *source, const FSSpec *dest);
6182 
6227  OSErr
6228  FSpExchangeFiles(const FSSpec *source, const FSSpec *dest);
6229 
6238 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6239 #pragma parameter __D0 PBShareSync(__A0)
6240 #endif
6241  OSErr
6242  PBShareSync(HParmBlkPtr paramBlock);
6243 
6252 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6253 #pragma parameter __D0 PBShareAsync(__A0)
6254 #endif
6255  OSErr
6256  PBShareAsync(HParmBlkPtr paramBlock);
6257 
6266 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6267 #pragma parameter __D0 PBUnshareSync(__A0)
6268 #endif
6269  OSErr
6270  PBUnshareSync(HParmBlkPtr paramBlock);
6271 
6280 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6281 #pragma parameter __D0 PBUnshareAsync(__A0)
6282 #endif
6283  OSErr
6284  PBUnshareAsync(HParmBlkPtr paramBlock);
6285 
6294 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6295 #pragma parameter __D0 PBGetUGEntrySync(__A0)
6296 #endif
6297  OSErr
6298  PBGetUGEntrySync(HParmBlkPtr paramBlock);
6299 
6308 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6309 #pragma parameter __D0 PBGetUGEntryAsync(__A0)
6310 #endif
6311  OSErr
6312  PBGetUGEntryAsync(HParmBlkPtr paramBlock);
6313 
6314 #if TARGET_CPU_68K
6320 #if CALL_NOT_IN_CARBON
6329 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6330 #pragma parameter __D0 PBGetAltAccessSync(__A0)
6331 #endif
6332  OSErr
6333  PBGetAltAccessSync(HParmBlkPtr paramBlock);
6334 
6343 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6344 #pragma parameter __D0 PBGetAltAccessAsync(__A0)
6345 #endif
6346  OSErr
6347  PBGetAltAccessAsync(HParmBlkPtr paramBlock);
6348 
6357 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6358 #pragma parameter __D0 PBSetAltAccessSync(__A0)
6359 #endif
6360  OSErr
6361  PBSetAltAccessSync(HParmBlkPtr paramBlock);
6362 
6371 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6372 #pragma parameter __D0 PBSetAltAccessAsync(__A0)
6373 #endif
6374  OSErr
6375  PBSetAltAccessAsync(HParmBlkPtr paramBlock);
6376 
6377 #endif /* CALL_NOT_IN_CARBON */
6378 
6379 #define PBSetAltAccess(pb, async) \
6380  ((async) ? PBSetAltAccessAsync(pb) : PBSetAltAccessSync(pb))
6381 #define PBGetAltAccess(pb, async) \
6382  ((async) ? PBGetAltAccessAsync(pb) : PBGetAltAccessSync(pb))
6383 #endif /* TARGET_CPU_68K */
6384 
6390 #define PBGetVInfo(pb, async) \
6391  ((async) ? PBGetVInfoAsync(pb) : PBGetVInfoSync(pb))
6392 #define PBXGetVolInfo(pb, async) \
6393  ((async) ? PBXGetVolInfoAsync(pb) : PBXGetVolInfoSync(pb))
6394 #define PBGetVol(pb, async) ((async) ? PBGetVolAsync(pb) : PBGetVolSync(pb))
6395 #define PBSetVol(pb, async) ((async) ? PBSetVolAsync(pb) : PBSetVolSync(pb))
6396 #define PBFlushVol(pb, async) \
6397  ((async) ? PBFlushVolAsync(pb) : PBFlushVolSync(pb))
6398 #define PBCreate(pb, async) ((async) ? PBCreateAsync(pb) : PBCreateSync(pb))
6399 #define PBDelete(pb, async) ((async) ? PBDeleteAsync(pb) : PBDeleteSync(pb))
6400 #define PBOpenDF(pb, async) ((async) ? PBOpenDFAsync(pb) : PBOpenDFSync(pb))
6401 #define PBOpenRF(pb, async) ((async) ? PBOpenRFAsync(pb) : PBOpenRFSync(pb))
6402 #define PBRename(pb, async) ((async) ? PBRenameAsync(pb) : PBRenameSync(pb))
6403 #define PBGetFInfo(pb, async) \
6404  ((async) ? PBGetFInfoAsync(pb) : PBGetFInfoSync(pb))
6405 #define PBSetFInfo(pb, async) \
6406  ((async) ? PBSetFInfoAsync(pb) : PBSetFInfoSync(pb))
6407 #define PBSetFLock(pb, async) \
6408  ((async) ? PBSetFLockAsync(pb) : PBSetFLockSync(pb))
6409 #define PBRstFLock(pb, async) \
6410  ((async) ? PBRstFLockAsync(pb) : PBRstFLockSync(pb))
6411 #define PBSetFVers(pb, async) \
6412  ((async) ? PBSetFVersAsync(pb) : PBSetFVersSync(pb))
6413 #define PBAllocate(pb, async) \
6414  ((async) ? PBAllocateAsync(pb) : PBAllocateSync(pb))
6415 #define PBGetEOF(pb, async) ((async) ? PBGetEOFAsync(pb) : PBGetEOFSync(pb))
6416 #define PBSetEOF(pb, async) ((async) ? PBSetEOFAsync(pb) : PBSetEOFSync(pb))
6417 #define PBGetFPos(pb, async) ((async) ? PBGetFPosAsync(pb) : PBGetFPosSync(pb))
6418 #define PBSetFPos(pb, async) ((async) ? PBSetFPosAsync(pb) : PBSetFPosSync(pb))
6419 #define PBFlushFile(pb, async) \
6420  ((async) ? PBFlushFileAsync(pb) : PBFlushFileSync(pb))
6421 #define PBCatSearch(pb, async) \
6422  ((async) ? PBCatSearchAsync(pb) : PBCatSearchSync(pb))
6423 #define PBOpenWD(pb, async) ((async) ? PBOpenWDAsync(pb) : PBOpenWDSync(pb))
6424 #define PBCloseWD(pb, async) ((async) ? PBCloseWDAsync(pb) : PBCloseWDSync(pb))
6425 #define PBHSetVol(pb, async) ((async) ? PBHSetVolAsync(pb) : PBHSetVolSync(pb))
6426 #define PBHGetVol(pb, async) ((async) ? PBHGetVolAsync(pb) : PBHGetVolSync(pb))
6427 #define PBCatMove(pb, async) ((async) ? PBCatMoveAsync(pb) : PBCatMoveSync(pb))
6428 #define PBDirCreate(pb, async) \
6429  ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb))
6430 #define PBGetWDInfo(pb, async) \
6431  ((async) ? PBGetWDInfoAsync(pb) : PBGetWDInfoSync(pb))
6432 #define PBGetFCBInfo(pb, async) \
6433  ((async) ? PBGetFCBInfoAsync(pb) : PBGetFCBInfoSync(pb))
6434 #define PBGetCatInfo(pb, async) \
6435  ((async) ? PBGetCatInfoAsync(pb) : PBGetCatInfoSync(pb))
6436 #define PBSetCatInfo(pb, async) \
6437  ((async) ? PBSetCatInfoAsync(pb) : PBSetCatInfoSync(pb))
6438 #define PBAllocContig(pb, async) \
6439  ((async) ? PBAllocContigAsync(pb) : PBAllocContigSync(pb))
6440 #define PBLockRange(pb, async) \
6441  ((async) ? PBLockRangeAsync(pb) : PBLockRangeSync(pb))
6442 #define PBUnlockRange(pb, async) \
6443  ((async) ? PBUnlockRangeAsync(pb) : PBUnlockRangeSync(pb))
6444 #define PBSetVInfo(pb, async) \
6445  ((async) ? PBSetVInfoAsync(pb) : PBSetVInfoSync(pb))
6446 #define PBHGetVInfo(pb, async) \
6447  ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb))
6448 #define PBHOpen(pb, async) ((async) ? PBHOpenAsync(pb) : PBHOpenSync(pb))
6449 #define PBHOpenRF(pb, async) ((async) ? PBHOpenRFAsync(pb) : PBHOpenRFSync(pb))
6450 #define PBHOpenDF(pb, async) ((async) ? PBHOpenDFAsync(pb) : PBHOpenDFSync(pb))
6451 #define PBHCreate(pb, async) ((async) ? PBHCreateAsync(pb) : PBHCreateSync(pb))
6452 #define PBHDelete(pb, async) ((async) ? PBHDeleteAsync(pb) : PBHDeleteSync(pb))
6453 #define PBHRename(pb, async) ((async) ? PBHRenameAsync(pb) : PBHRenameSync(pb))
6454 #define PBHRstFLock(pb, async) \
6455  ((async) ? PBHRstFLockAsync(pb) : PBHRstFLockSync(pb))
6456 #define PBHSetFLock(pb, async) \
6457  ((async) ? PBHSetFLockAsync(pb) : PBHSetFLockSync(pb))
6458 #define PBHGetFInfo(pb, async) \
6459  ((async) ? PBHGetFInfoAsync(pb) : PBHGetFInfoSync(pb))
6460 #define PBHSetFInfo(pb, async) \
6461  ((async) ? PBHSetFInfoAsync(pb) : PBHSetFInfoSync(pb))
6462 #define PBMakeFSSpec(pb, async) \
6463  ((async) ? PBMakeFSSpecAsync(pb) : PBMakeFSSpecSync(pb))
6464 #define PBHGetVolParms(pb, async) \
6465  ((async) ? PBHGetVolParmsAsync(pb) : PBHGetVolParmsSync(pb))
6466 #define PBHGetLogInInfo(pb, async) \
6467  ((async) ? PBHGetLogInInfoAsync(pb) : PBHGetLogInInfoSync(pb))
6468 #define PBHGetDirAccess(pb, async) \
6469  ((async) ? PBHGetDirAccessAsync(pb) : PBHGetDirAccessSync(pb))
6470 #define PBHSetDirAccess(pb, async) \
6471  ((async) ? PBHSetDirAccessAsync(pb) : PBHSetDirAccessSync(pb))
6472 #define PBHMapID(pb, async) ((async) ? PBHMapIDAsync(pb) : PBHMapIDSync(pb))
6473 #define PBHMapName(pb, async) \
6474  ((async) ? PBHMapNameAsync(pb) : PBHMapNameSync(pb))
6475 #define PBHCopyFile(pb, async) \
6476  ((async) ? PBHCopyFileAsync(pb) : PBHCopyFileSync(pb))
6477 #define PBHMoveRename(pb, async) \
6478  ((async) ? PBHMoveRenameAsync(pb) : PBHMoveRenameSync(pb))
6479 #define PBHOpenDeny(pb, async) \
6480  ((async) ? PBHOpenDenyAsync(pb) : PBHOpenDenySync(pb))
6481 #define PBHOpenRFDeny(pb, async) \
6482  ((async) ? PBHOpenRFDenyAsync(pb) : PBHOpenRFDenySync(pb))
6483 #define PBExchangeFiles(pb, async) \
6484  ((async) ? PBExchangeFilesAsync(pb) : PBExchangeFilesSync(pb))
6485 #define PBCreateFileIDRef(pb, async) \
6486  ((async) ? PBCreateFileIDRefAsync(pb) : PBCreateFileIDRefSync(pb))
6487 #define PBResolveFileIDRef(pb, async) \
6488  ((async) ? PBResolveFileIDRefAsync(pb) : PBResolveFileIDRefSync(pb))
6489 #define PBDeleteFileIDRef(pb, async) \
6490  ((async) ? PBDeleteFileIDRefAsync(pb) : PBDeleteFileIDRefSync(pb))
6491 #define PBGetForeignPrivs(pb, async) \
6492  ((async) ? PBGetForeignPrivsAsync(pb) : PBGetForeignPrivsSync(pb))
6493 #define PBSetForeignPrivs(pb, async) \
6494  ((async) ? PBSetForeignPrivsAsync(pb) : PBSetForeignPrivsSync(pb))
6495 #define PBDTAddIcon(pb, async) \
6496  ((async) ? PBDTAddIconAsync(pb) : PBDTAddIconSync(pb))
6497 #define PBDTGetIcon(pb, async) \
6498  ((async) ? PBDTGetIconAsync(pb) : PBDTGetIconSync(pb))
6499 #define PBDTGetIconInfo(pb, async) \
6500  ((async) ? PBDTGetIconInfoAsync(pb) : PBDTGetIconInfoSync(pb))
6501 #define PBDTAddAPPL(pb, async) \
6502  ((async) ? PBDTAddAPPLAsync(pb) : PBDTAddAPPLSync(pb))
6503 #define PBDTRemoveAPPL(pb, async) \
6504  ((async) ? PBDTRemoveAPPLAsync(pb) : PBDTRemoveAPPLSync(pb))
6505 #define PBDTGetAPPL(pb, async) \
6506  ((async) ? PBDTGetAPPLAsync(pb) : PBDTGetAPPLSync(pb))
6507 #define PBDTSetComment(pb, async) \
6508  ((async) ? PBDTSetCommentAsync(pb) : PBDTSetCommentSync(pb))
6509 #define PBDTRemoveComment(pb, async) \
6510  ((async) ? PBDTRemoveCommentAsync(pb) : PBDTRemoveCommentSync(pb))
6511 #define PBDTGetComment(pb, async) \
6512  ((async) ? PBDTGetCommentAsync(pb) : PBDTGetCommentSync(pb))
6513 #define PBDTFlush(pb, async) ((async) ? PBDTFlushAsync(pb) : PBDTFlushSync(pb))
6514 #define PBDTReset(pb, async) ((async) ? PBDTResetAsync(pb) : PBDTResetSync(pb))
6515 #define PBDTGetInfo(pb, async) \
6516  ((async) ? PBDTGetInfoAsync(pb) : PBDTGetInfoSync(pb))
6517 #define PBDTDelete(pb, async) \
6518  ((async) ? PBDTDeleteAsync(pb) : PBDTDeleteSync(pb))
6519 
6520  typedef SInt16 FSVolumeRefNum;
6521  enum
6522  {
6523  kFSInvalidVolumeRefNum = 0
6524  };
6525 
6526  struct FSRef
6527  {
6528  UInt8 hidden[80]; /* private to File Manager; ©© need symbolic constant */
6529  };
6530  typedef struct FSRef FSRef;
6531  typedef FSRef *FSRefPtr;
6532 
6545  {
6546  UInt32 userID;
6547  UInt32 groupID;
6548  UInt8 reserved1;
6549  UInt8 userAccess;
6550  UInt16 mode;
6551  UInt32 reserved2;
6552  };
6553  typedef struct FSPermissionInfo FSPermissionInfo;
6554  /* CatalogInfoBitmap describes which fields of the CatalogInfo you wish to get
6555  * or set.*/
6556 
6557  typedef UInt32 FSCatalogInfoBitmap;
6558  enum
6559  {
6560  kFSCatInfoNone = 0x00000000,
6561  kFSCatInfoTextEncoding = 0x00000001,
6562  kFSCatInfoNodeFlags =
6563  0x00000002, /* Locked (bit 0) and directory (bit 4) only */
6564  kFSCatInfoVolume = 0x00000004,
6565  kFSCatInfoParentDirID = 0x00000008,
6566  kFSCatInfoNodeID = 0x00000010,
6567  kFSCatInfoCreateDate = 0x00000020,
6568  kFSCatInfoContentMod = 0x00000040,
6569  kFSCatInfoAttrMod = 0x00000080,
6570  kFSCatInfoAccessDate = 0x00000100,
6571  kFSCatInfoBackupDate = 0x00000200,
6572  kFSCatInfoPermissions = 0x00000400, /* Should this be finer granularity? */
6573  kFSCatInfoFinderInfo = 0x00000800,
6574  kFSCatInfoFinderXInfo = 0x00001000,
6575  kFSCatInfoValence = 0x00002000, /* Folders only, zero for files */
6576  kFSCatInfoDataSizes = 0x00004000, /* Data fork logical and physical size */
6577  kFSCatInfoRsrcSizes =
6578  0x00008000, /* Resource fork logical and physical size */
6579  kFSCatInfoSharingFlags = 0x00010000, /* sharingFlags: kioFlAttribMountedBit,
6580  kioFlAttribSharePointBit */
6581  kFSCatInfoUserPrivs = 0x00020000, /* userPrivileges */
6582  kFSCatInfoUserAccess = 0x00080000, /* (OS X only) */
6583  kFSCatInfoAllDates = 0x000003E0,
6584  kFSCatInfoGettableInfo = 0x0003FFFF,
6585  kFSCatInfoSettableInfo =
6586  0x00001FE3, /* flags, dates, permissions, Finder info, text encoding */
6587  kFSCatInfoReserved = (long)0xFFFC0000 /* bits that are currently reserved */
6588  };
6589 
6590  /* Constants for nodeFlags field of FSCatalogInfo */
6591  enum
6592  {
6593  kFSNodeLockedBit = 0, /* Set if file or directory is locked */
6594  kFSNodeLockedMask = 0x0001,
6595  kFSNodeResOpenBit = 2, /* Set if the resource fork is open */
6596  kFSNodeResOpenMask = 0x0004,
6597  kFSNodeDataOpenBit = 3, /* Set if the data fork is open */
6598  kFSNodeDataOpenMask = 0x0008,
6599  kFSNodeIsDirectoryBit = 4, /* Set if the object is a directory */
6600  kFSNodeIsDirectoryMask = 0x0010,
6601  kFSNodeCopyProtectBit = 6,
6602  kFSNodeCopyProtectMask = 0x0040,
6603  kFSNodeForkOpenBit = 7, /* Set if the file or directory has any open fork */
6604  kFSNodeForkOpenMask = 0x0080
6605  };
6606 
6607  /* Constants for sharingFlags field of FSCatalogInfo */
6608  enum
6609  {
6610  kFSNodeInSharedBit = 2, /* Set if a directory is within a share point */
6611  kFSNodeInSharedMask = 0x0004,
6612  kFSNodeIsMountedBit = 3, /* Set if a directory is a share point currently
6613  mounted by some user */
6614  kFSNodeIsMountedMask = 0x0008,
6615  kFSNodeIsSharePointBit =
6616  5, /* Set if a directory is a share point (exported volume) */
6617  kFSNodeIsSharePointMask = 0x0020
6618  };
6619 
6621  {
6622  UInt16 nodeFlags; /* node flags */
6623  FSVolumeRefNum volume; /* object's volume ref */
6624  UInt32 parentDirID; /* parent directory's ID */
6625  UInt32 nodeID; /* file/directory ID */
6626  UInt8 sharingFlags; /* kioFlAttribMountedBit and kioFlAttribSharePointBit */
6627  UInt8 userPrivileges; /* user's effective AFP privileges (same as ioACUser) */
6628  UInt8 reserved1;
6629  UInt8 reserved2;
6630  UTCDateTime createDate; /* date and time of creation */
6631  UTCDateTime contentModDate; /* date and time of last fork modification */
6632  UTCDateTime
6633  attributeModDate; /* date and time of last attribute modification */
6634  UTCDateTime accessDate; /* date and time of last access (for Mac OS X) */
6635  UTCDateTime backupDate; /* date and time of last backup */
6636 
6637  UInt32 permissions[4]; /* permissions (for Mac OS X) */
6638 
6639  UInt8 finderInfo[16]; /* Finder information part 1 */
6640  UInt8 extFinderInfo[16]; /* Finder information part 2 */
6641 
6642  UInt64 dataLogicalSize; /* files only */
6643  UInt64 dataPhysicalSize; /* files only */
6644  UInt64 rsrcLogicalSize; /* files only */
6645  UInt64 rsrcPhysicalSize; /* files only */
6646 
6647  UInt32 valence; /* folders only */
6648  TextEncoding textEncodingHint;
6649  };
6650  typedef struct FSCatalogInfo FSCatalogInfo;
6652  struct FSRefParam
6653  {
6654  QElemPtr qLink; /*queue link in header*/
6655  short qType; /*type byte for safety check*/
6656  short ioTrap; /*FS: the Trap*/
6657  Ptr ioCmdAddr; /*FS: address to dispatch to*/
6658  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
6659  volatile OSErr ioResult; /*result code*/
6660  ConstStringPtr ioNamePtr; /*ptr to Vol:FileName string*/
6661  short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
6662 
6663  SInt16 reserved1; /* was ioRefNum */
6664  UInt8 reserved2; /* was ioVersNum */
6665  UInt8 reserved3; /* was ioPermssn */
6666 
6667  const FSRef *ref; /* Input ref; the target of the call */
6668  FSCatalogInfoBitmap whichInfo;
6669  FSCatalogInfo *catInfo;
6670  UniCharCount nameLength; /* input name length for create/rename */
6671  const UniChar *name; /* input name for create/rename */
6672  long ioDirID;
6673  FSSpec *spec;
6674  FSRef *parentRef; /* ref of directory to move another ref to */
6675  FSRef *newRef; /* Output ref */
6676  TextEncoding textEncodingHint; /* for Rename, MakeFSRefUnicode */
6677  HFSUniStr255 *outName; /* Output name for GetCatalogInfo */
6678  };
6679  typedef struct FSRefParam FSRefParam;
6680  typedef FSRefParam *FSRefParamPtr;
6681  typedef struct OpaqueFSIterator *FSIterator;
6682  enum
6683  {
6684  kFSIterateFlat = 0, /* Immediate children of container only */
6685  kFSIterateSubtree = 1, /* Entire subtree rooted at container */
6686  kFSIterateDelete = 2,
6687  kFSIterateReserved = (long)0xFFFFFFFC
6688  };
6689 
6690  typedef OptionBits FSIteratorFlags;
6691  enum
6692  {
6693  /* CatalogSearch constants */
6694  fsSBNodeID = 0x00008000, /* search by range of nodeID */
6695  fsSBAttributeModDate = 0x00010000, /* search by range of attributeModDate */
6696  fsSBAccessDate = 0x00020000, /* search by range of accessDate */
6697  fsSBPermissions = 0x00040000, /* search by value/mask of permissions */
6698  fsSBNodeIDBit = 15,
6699  fsSBAttributeModDateBit = 16,
6700  fsSBAccessDateBit = 17,
6701  fsSBPermissionsBit = 18
6702  };
6703 
6705  {
6706  Duration searchTime; /* a Time Manager duration */
6707  OptionBits searchBits; /* which fields to search on */
6708  UniCharCount searchNameLength;
6709  const UniChar *searchName;
6710  FSCatalogInfo *searchInfo1; /* values and lower bounds */
6711  FSCatalogInfo *searchInfo2; /* masks and upper bounds */
6712  };
6713  typedef struct FSSearchParams FSSearchParams;
6716  {
6717  QElemPtr qLink; /*queue link in header*/
6718  short qType; /*type byte for safety check*/
6719  short ioTrap; /*FS: the Trap*/
6720  Ptr ioCmdAddr; /*FS: address to dispatch to*/
6721  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
6722  volatile OSErr ioResult; /*result code*/
6723  Boolean containerChanged; /* true if container changed since last iteration */
6724  UInt8 reserved; /* make following fields 4-byte aligned */
6725 
6726  FSIteratorFlags iteratorFlags;
6727  FSIterator iterator;
6728  const FSRef *container; /* directory/volume to iterate */
6729  ItemCount maximumItems;
6730  ItemCount actualItems;
6731  FSCatalogInfoBitmap whichInfo;
6732  FSCatalogInfo *catalogInfo; /* returns an array */
6733  FSRef *refs; /* returns an array */
6734  FSSpec *specs; /* returns an array */
6735  HFSUniStr255 *names; /* returns an array */
6736  const FSSearchParams *searchParams;
6737  };
6738  typedef struct FSCatalogBulkParam FSCatalogBulkParam;
6740  typedef UInt16 FSAllocationFlags;
6741  enum
6742  {
6743  kFSAllocDefaultFlags = 0x0000, /* as much as possible, not contiguous */
6744  kFSAllocAllOrNothingMask = 0x0001, /* allocate all of the space, or nothing */
6745  kFSAllocContiguousMask = 0x0002, /* new space must be one contiguous piece */
6746  kFSAllocNoRoundUpMask = 0x0004, /* don't round up allocation to clump size */
6747  kFSAllocReservedMask =
6748  0xFFF8 /* these bits are reserved and must not be set */
6749  };
6750 
6752  {
6753  QElemPtr qLink; /*queue link in header*/
6754  short qType; /*type byte for safety check*/
6755  short ioTrap; /*FS: the Trap*/
6756  Ptr ioCmdAddr; /*FS: address to dispatch to*/
6757  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
6758  volatile OSErr ioResult; /*result code*/
6759  void *reserved1; /* was ioNamePtr */
6760  SInt16 reserved2; /* was ioVRefNum */
6761  SInt16 forkRefNum; /* same as ioRefNum */
6762  UInt8 reserved3; /* was ioVersNum */
6763  SInt8 permissions; /* desired access to the fork */
6764  const FSRef *ref; /* which object to open */
6765 
6766  Ptr buffer; /*data buffer Ptr*/
6767  UInt32 requestCount; /*requested byte count*/
6768  UInt32 actualCount; /*actual byte count completed*/
6769  UInt16 positionMode; /*initial file positioning*/
6770  SInt64 positionOffset; /*file position offset*/
6771 
6772  FSAllocationFlags allocationFlags;
6773  UInt64 allocationAmount;
6774 
6775  UniCharCount forkNameLength; /* input; length of fork name */
6776  const UniChar *forkName; /* input; name of fork */
6777 
6778  CatPositionRec forkIterator;
6779  HFSUniStr255 *outForkName; /* output; name of fork */
6780  };
6781  typedef struct FSForkIOParam FSForkIOParam;
6783  struct FSForkInfo
6784  {
6785  SInt8 flags; /* copy of FCB flags */
6786  SInt8 permissions;
6787  FSVolumeRefNum volume;
6788  UInt32 reserved2;
6789  UInt32 nodeID; /* file or directory ID */
6790  UInt32 forkID; /* fork ID */
6791  UInt64 currentPosition;
6792  UInt64 logicalEOF;
6793  UInt64 physicalEOF;
6794  UInt64 process; /* should be ProcessSerialNumber */
6795  };
6796  typedef struct FSForkInfo FSForkInfo;
6797  typedef FSForkInfo *FSForkInfoPtr;
6799  {
6800  QElemPtr qLink; /*queue link in header*/
6801  short qType; /*type byte for safety check*/
6802  short ioTrap; /*FS: the Trap*/
6803  Ptr ioCmdAddr; /*FS: address to dispatch to*/
6804  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
6805  volatile OSErr ioResult; /*result code*/
6806  SInt16 desiredRefNum; /* 0 to iterate, non-0 for specific refnum */
6807  SInt16 volumeRefNum; /* volume to match, or 0 for all volumes */
6808  SInt16 iterator; /* 0 to start iteration */
6809  SInt16 actualRefNum; /* actual refnum found */
6810 
6811  FSRef *ref;
6812  FSForkInfo *forkInfo;
6813  HFSUniStr255 *forkName;
6814  };
6815  typedef struct FSForkCBInfoParam FSForkCBInfoParam;
6817  typedef UInt32 FSVolumeInfoBitmap;
6818  enum
6819  {
6820  kFSVolInfoNone = 0x0000,
6821  kFSVolInfoCreateDate = 0x0001,
6822  kFSVolInfoModDate = 0x0002,
6823  kFSVolInfoBackupDate = 0x0004,
6824  kFSVolInfoCheckedDate = 0x0008,
6825  kFSVolInfoFileCount = 0x0010,
6826  kFSVolInfoDirCount = 0x0020,
6827  kFSVolInfoSizes = 0x0040, /* totalBytes and freeBytes */
6828  kFSVolInfoBlocks = 0x0080, /* blockSize, totalBlocks, freeBlocks */
6829  kFSVolInfoNextAlloc = 0x0100,
6830  kFSVolInfoRsrcClump = 0x0200,
6831  kFSVolInfoDataClump = 0x0400,
6832  kFSVolInfoNextID = 0x0800,
6833  kFSVolInfoFinderInfo = 0x1000,
6834  kFSVolInfoFlags = 0x2000,
6835  kFSVolInfoFSInfo = 0x4000, /* filesystemID, signature */
6836  kFSVolInfoDriveInfo = 0x8000, /* driveNumber, driverRefNum */
6837  kFSVolInfoGettableInfo =
6838  0xFFFF, /* This seems like it is here just for completeness */
6839  kFSVolInfoSettableInfo = 0x3004 /* backup date, Finder info, flags */
6840  };
6841 
6842  /* FSVolumeInfo.flags bits. These are the same as for ioVAtrb, but with nicer
6843  * names. */
6844  enum
6845  {
6846  kFSVolFlagDefaultVolumeBit = 5, /* Set if the volume is the default volume */
6847  kFSVolFlagDefaultVolumeMask = 0x0020,
6848  kFSVolFlagFilesOpenBit = 6, /* Set if there are open files or iterators */
6849  kFSVolFlagFilesOpenMask = 0x0040,
6850  kFSVolFlagHardwareLockedBit =
6851  7, /* Set if volume is locked by a hardware setting */
6852  kFSVolFlagHardwareLockedMask = 0x0080,
6853  kFSVolFlagSoftwareLockedBit = 15, /* Set if volume is locked by software */
6854  kFSVolFlagSoftwareLockedMask = 0x8000
6855  };
6856 
6858  {
6859  /* Dates -- zero means "never" or "unknown" */
6860  UTCDateTime createDate;
6861  UTCDateTime modifyDate;
6862  UTCDateTime backupDate;
6863  UTCDateTime checkedDate;
6864 
6865  /* File/Folder counts -- return zero if unknown */
6866  UInt32 fileCount; /* total files on volume */
6867  UInt32 folderCount; /* total folders on volume */
6868  /* Note: no root directory counts */
6869 
6870  UInt64 totalBytes; /* total number of bytes on volume */
6871  UInt64 freeBytes; /* number of free bytes on volume */
6872 
6873  /* HFS and HFS Plus specific. Set fields to zero if not appropriate */
6874  UInt32 blockSize; /* size (in bytes) of allocation blocks */
6875  UInt32 totalBlocks; /* number of allocation blocks in volume */
6876  UInt32 freeBlocks; /* number of unused allocation blocks */
6877  UInt32 nextAllocation; /* start of next allocation search */
6878  UInt32 rsrcClumpSize; /* default resource fork clump size */
6879  UInt32 dataClumpSize; /* default data fork clump size */
6880  UInt32 nextCatalogID; /* next unused catalog node ID ©©© OYG ©©© need to make
6881  HFSVolumes.h work Should be HFSCatalogNodeID*/
6882  UInt8 finderInfo[32]; /* information used by Finder */
6883 
6884  /* Identifying information */
6885  UInt16 flags; /* ioVAtrb */
6886  UInt16 filesystemID; /* ioVFSID */
6887  UInt16 signature; /* ioVSigWord, unique within an FSID */
6888  UInt16 driveNumber; /* ioVDrvInfo */
6889  short driverRefNum; /* ioVDRefNum */
6890  };
6891  typedef struct FSVolumeInfo FSVolumeInfo;
6892  typedef FSVolumeInfo *FSVolumeInfoPtr;
6894  {
6895  QElemPtr qLink; /*queue link in header*/
6896  short qType; /*type byte for safety check*/
6897  short ioTrap; /*FS: the Trap*/
6898  Ptr ioCmdAddr; /*FS: address to dispatch to*/
6899  IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
6900  volatile OSErr ioResult; /*result code*/
6901  StringPtr ioNamePtr; /* unused */
6902  FSVolumeRefNum ioVRefNum; /* volume refnum */
6903 
6904  UInt32 volumeIndex; /* index, or 0 to use ioVRefNum */
6905  FSVolumeInfoBitmap whichInfo; /* which volumeInfo fields to get/set */
6906  FSVolumeInfo *volumeInfo; /* information about the volume */
6907  HFSUniStr255 *volumeName; /* output; pointer to volume name */
6908  FSRef *ref; /* volume's FSRef */
6909  };
6910  typedef struct FSVolumeInfoParam FSVolumeInfoParam;
6931  OSErr
6932  FSpMakeFSRef(const FSSpec *source, FSRef *newRef);
6933 
6942 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6943 #pragma parameter __D0 PBMakeFSRefSync(__A0)
6944 #endif
6945  OSErr
6947 
6956 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6957 #pragma parameter PBMakeFSRefAsync(__A0)
6958 #endif
6959  void
6961 
6982  OSErr
6983  FSMakeFSRefUnicode(const FSRef *parentRef, UniCharCount nameLength,
6984  const UniChar *name, TextEncoding textEncodingHint,
6985  FSRef *newRef);
6986 
6995 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
6996 #pragma parameter __D0 PBMakeFSRefUnicodeSync(__A0)
6997 #endif
6998  OSErr
7000 
7009 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7010 #pragma parameter PBMakeFSRefUnicodeAsync(__A0)
7011 #endif
7012  void
7014 
7033  OSErr
7034  FSCompareFSRefs(const FSRef *ref1, const FSRef *ref2);
7035 
7044 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7045 #pragma parameter __D0 PBCompareFSRefsSync(__A0)
7046 #endif
7047  OSErr
7049 
7058 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7059 #pragma parameter PBCompareFSRefsAsync(__A0)
7060 #endif
7061  void
7063 
7087  OSErr
7088  FSCreateFileUnicode(const FSRef *parentRef, UniCharCount nameLength,
7089  const UniChar *name, FSCatalogInfoBitmap whichInfo,
7090  const FSCatalogInfo *catalogInfo, /* can be NULL */
7091  FSRef *newRef, /* can be NULL */
7092  FSSpec *newSpec) /* can be NULL */;
7093 
7102 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7103 #pragma parameter __D0 PBCreateFileUnicodeSync(__A0)
7104 #endif
7105  OSErr
7107 
7116 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7117 #pragma parameter PBCreateFileUnicodeAsync(__A0)
7118 #endif
7119  void
7121 
7148  OSErr
7150  const FSRef *parentRef, UniCharCount nameLength, const UniChar *name,
7151  FSCatalogInfoBitmap whichInfo,
7152  const FSCatalogInfo *catalogInfo, /* can be NULL */
7153  FSRef *newRef, /* can be NULL */
7154  FSSpec *newSpec, /* can be NULL */
7155  UInt32 *newDirID) /* can be NULL */;
7156 
7165 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7166 #pragma parameter __D0 PBCreateDirectoryUnicodeSync(__A0)
7167 #endif
7168  OSErr
7170 
7179 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7180 #pragma parameter PBCreateDirectoryUnicodeAsync(__A0)
7181 #endif
7182  void
7184 
7200  OSErr
7201  FSDeleteObject(const FSRef *ref);
7202 
7211 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7212 #pragma parameter __D0 PBDeleteObjectSync(__A0)
7213 #endif
7214  OSErr
7216 
7225 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7226 #pragma parameter PBDeleteObjectAsync(__A0)
7227 #endif
7228  void
7230 
7254  OSErr
7255  FSMoveObject(const FSRef *ref, const FSRef *destDirectory,
7256  FSRef *newRef) /* can be NULL */;
7257 
7266 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7267 #pragma parameter __D0 PBMoveObjectSync(__A0)
7268 #endif
7269  OSErr
7271 
7280 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7281 #pragma parameter PBMoveObjectAsync(__A0)
7282 #endif
7283  void
7285 
7302  OSErr
7303  FSExchangeObjects(const FSRef *ref, const FSRef *destRef);
7304 
7313 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7314 #pragma parameter __D0 PBExchangeObjectsSync(__A0)
7315 #endif
7316  OSErr
7318 
7327 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7328 #pragma parameter PBExchangeObjectsAsync(__A0)
7329 #endif
7330  void
7332 
7358  OSErr
7359  FSRenameUnicode(const FSRef *ref, UniCharCount nameLength, const UniChar *name,
7360  TextEncoding textEncodingHint,
7361  FSRef *newRef) /* can be NULL */;
7362 
7371 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7372 #pragma parameter __D0 PBRenameUnicodeSync(__A0)
7373 #endif
7374  OSErr
7376 
7385 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7386 #pragma parameter PBRenameUnicodeAsync(__A0)
7387 #endif
7388  void
7390 
7416  OSErr
7417  FSGetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo,
7418  FSCatalogInfo *catalogInfo, /* can be NULL */
7419  HFSUniStr255 *outName, /* can be NULL */
7420  FSSpec *fsSpec, /* can be NULL */
7421  FSRef *parentRef) /* can be NULL */;
7422 
7431 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7432 #pragma parameter __D0 PBGetCatalogInfoSync(__A0)
7433 #endif
7434  OSErr
7436 
7445 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7446 #pragma parameter PBGetCatalogInfoAsync(__A0)
7447 #endif
7448  void
7450 
7471  OSErr
7472  FSSetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo,
7473  const FSCatalogInfo *catalogInfo);
7474 
7483 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7484 #pragma parameter __D0 PBSetCatalogInfoSync(__A0)
7485 #endif
7486  OSErr
7488 
7497 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7498 #pragma parameter PBSetCatalogInfoAsync(__A0)
7499 #endif
7500  void
7502 
7523  OSErr
7524  FSOpenIterator(const FSRef *container, FSIteratorFlags iteratorFlags,
7525  FSIterator *iterator);
7526 
7535 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7536 #pragma parameter __D0 PBOpenIteratorSync(__A0)
7537 #endif
7538  OSErr
7540 
7549 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7550 #pragma parameter PBOpenIteratorAsync(__A0)
7551 #endif
7552  void
7554 
7570  OSErr
7571  FSCloseIterator(FSIterator iterator);
7572 
7581 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7582 #pragma parameter __D0 PBCloseIteratorSync(__A0)
7583 #endif
7584  OSErr
7586 
7595 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7596 #pragma parameter PBCloseIteratorAsync(__A0)
7597 #endif
7598  void
7600 
7629  OSErr
7631  FSIterator iterator, ItemCount maximumObjects, ItemCount *actualObjects,
7632  Boolean *containerChanged, /* can be NULL */
7633  FSCatalogInfoBitmap whichInfo,
7634  FSCatalogInfo *catalogInfos, /* can be NULL */
7635  FSRef *refs, /* can be NULL */
7636  FSSpec *specs, /* can be NULL */
7637  HFSUniStr255 *names) /* can be NULL */;
7638 
7647 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7648 #pragma parameter __D0 PBGetCatalogInfoBulkSync(__A0)
7649 #endif
7650  OSErr
7652 
7661 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7662 #pragma parameter PBGetCatalogInfoBulkAsync(__A0)
7663 #endif
7664  void
7666 
7698  OSErr
7699  FSCatalogSearch(FSIterator iterator, const FSSearchParams *searchCriteria,
7700  ItemCount maximumObjects, ItemCount *actualObjects,
7701  Boolean *containerChanged, /* can be NULL */
7702  FSCatalogInfoBitmap whichInfo,
7703  FSCatalogInfo *catalogInfos, /* can be NULL */
7704  FSRef *refs, /* can be NULL */
7705  FSSpec *specs, /* can be NULL */
7706  HFSUniStr255 *names) /* can be NULL */;
7707 
7716 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7717 #pragma parameter __D0 PBCatalogSearchSync(__A0)
7718 #endif
7719  OSErr
7721 
7730 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7731 #pragma parameter PBCatalogSearchAsync(__A0)
7732 #endif
7733  void
7735 
7753  OSErr
7754  FSCreateFork(const FSRef *ref, UniCharCount forkNameLength,
7755  const UniChar *forkName) /* can be NULL */;
7756 
7765 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7766 #pragma parameter __D0 PBCreateForkSync(__A0)
7767 #endif
7768  OSErr
7770 
7779 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7780 #pragma parameter PBCreateForkAsync(__A0)
7781 #endif
7782  void
7784 
7802  OSErr
7803  FSDeleteFork(const FSRef *ref, UniCharCount forkNameLength,
7804  const UniChar *forkName) /* can be NULL */;
7805 
7814 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7815 #pragma parameter __D0 PBDeleteForkSync(__A0)
7816 #endif
7817  OSErr
7819 
7828 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7829 #pragma parameter PBDeleteForkAsync(__A0)
7830 #endif
7831  void
7833 
7855  OSErr
7857  const FSRef *ref, CatPositionRec *forkIterator,
7858  HFSUniStr255 *forkName, /* can be NULL */
7859  SInt64 *forkSize, /* can be NULL */
7860  UInt64 *forkPhysicalSize) /* can be NULL */;
7861 
7870 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7871 #pragma parameter __D0 PBIterateForksSync(__A0)
7872 #endif
7873  OSErr
7875 
7884 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7885 #pragma parameter PBIterateForksAsync(__A0)
7886 #endif
7887  void
7889 
7912  OSErr
7913  FSOpenFork(const FSRef *ref, UniCharCount forkNameLength,
7914  const UniChar *forkName, /* can be NULL */
7915  SInt8 permissions, SInt16 *forkRefNum);
7916 
7925 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7926 #pragma parameter __D0 PBOpenForkSync(__A0)
7927 #endif
7928  OSErr
7930 
7939 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7940 #pragma parameter PBOpenForkAsync(__A0)
7941 #endif
7942  void
7944 
7966  OSErr
7967  FSReadFork(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset,
7968  ByteCount requestCount, void *buffer,
7969  ByteCount *actualCount) /* can be NULL */;
7970 
7979 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7980 #pragma parameter __D0 PBReadForkSync(__A0)
7981 #endif
7982  OSErr
7984 
7993 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
7994 #pragma parameter PBReadForkAsync(__A0)
7995 #endif
7996  void
7998 
8020  OSErr
8021  FSWriteFork(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset,
8022  ByteCount requestCount, const void *buffer,
8023  ByteCount *actualCount) /* can be NULL */;
8024 
8033 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8034 #pragma parameter __D0 PBWriteForkSync(__A0)
8035 #endif
8036  OSErr
8038 
8047 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8048 #pragma parameter PBWriteForkAsync(__A0)
8049 #endif
8050  void
8052 
8070  OSErr
8071  FSGetForkPosition(SInt16 forkRefNum, SInt64 *position);
8072 
8081 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8082 #pragma parameter __D0 PBGetForkPositionSync(__A0)
8083 #endif
8084  OSErr
8086 
8095 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8096 #pragma parameter PBGetForkPositionAsync(__A0)
8097 #endif
8098  void
8100 
8119  OSErr
8120  FSSetForkPosition(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset);
8121 
8130 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8131 #pragma parameter __D0 PBSetForkPositionSync(__A0)
8132 #endif
8133  OSErr
8135 
8144 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8145 #pragma parameter PBSetForkPositionAsync(__A0)
8146 #endif
8147  void
8149 
8166  OSErr
8167  FSGetForkSize(SInt16 forkRefNum, SInt64 *forkSize);
8168 
8177 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8178 #pragma parameter __D0 PBGetForkSizeSync(__A0)
8179 #endif
8180  OSErr
8182 
8191 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8192 #pragma parameter PBGetForkSizeAsync(__A0)
8193 #endif
8194  void
8196 
8215  OSErr
8216  FSSetForkSize(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset);
8217 
8226 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8227 #pragma parameter __D0 PBSetForkSizeSync(__A0)
8228 #endif
8229  OSErr
8231 
8240 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8241 #pragma parameter PBSetForkSizeAsync(__A0)
8242 #endif
8243  void
8245 
8279  OSErr
8280  FSAllocateFork(SInt16 forkRefNum, FSAllocationFlags flags, UInt16 positionMode,
8281  SInt64 positionOffset, UInt64 requestCount,
8282  UInt64 *actualCount) /* can be NULL */;
8283 
8292 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8293 #pragma parameter __D0 PBAllocateForkSync(__A0)
8294 #endif
8295  OSErr
8297 
8306 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8307 #pragma parameter PBAllocateForkAsync(__A0)
8308 #endif
8309  void
8311 
8328  OSErr
8329  FSFlushFork(SInt16 forkRefNum);
8330 
8339 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8340 #pragma parameter __D0 PBFlushForkSync(__A0)
8341 #endif
8342  OSErr
8344 
8353 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8354 #pragma parameter PBFlushForkAsync(__A0)
8355 #endif
8356  void
8358 
8376  OSErr
8377  FSCloseFork(SInt16 forkRefNum);
8378 
8387 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8388 #pragma parameter __D0 PBCloseForkSync(__A0)
8389 #endif
8390  OSErr
8392 
8401 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8402 #pragma parameter PBCloseForkAsync(__A0)
8403 #endif
8404  void
8406 
8440  OSErr
8442  SInt16 desiredRefNum, FSVolumeRefNum volume,
8443  SInt16 *iterator, /* can be NULL */
8444  SInt16 *actualRefNum, /* can be NULL */
8445  FSForkInfo *forkInfo, /* can be NULL */
8446  FSRef *ref, /* can be NULL */
8447  HFSUniStr255 *outForkName) /* can be NULL */;
8448 
8457 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8458 #pragma parameter __D0 PBGetForkCBInfoSync(__A0)
8459 #endif
8460  OSErr
8462 
8471 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8472 #pragma parameter PBGetForkCBInfoAsync(__A0)
8473 #endif
8474  void
8476 
8502  OSErr
8503  FSGetVolumeInfo(FSVolumeRefNum volume, ItemCount volumeIndex,
8504  FSVolumeRefNum *actualVolume, /* can be NULL */
8505  FSVolumeInfoBitmap whichInfo,
8506  FSVolumeInfo *info, /* can be NULL */
8507  HFSUniStr255 *volumeName, /* can be NULL */
8508  FSRef *rootDirectory) /* can be NULL */;
8509 
8518 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8519 #pragma parameter __D0 PBGetVolumeInfoSync(__A0)
8520 #endif
8521  OSErr
8523 
8532 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8533 #pragma parameter PBGetVolumeInfoAsync(__A0)
8534 #endif
8535  void
8537 
8558  OSErr
8559  FSSetVolumeInfo(FSVolumeRefNum volume, FSVolumeInfoBitmap whichInfo,
8560  const FSVolumeInfo *info);
8561 
8570 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8571 #pragma parameter __D0 PBSetVolumeInfoSync(__A0)
8572 #endif
8573  OSErr
8575 
8584 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
8585 #pragma parameter PBSetVolumeInfoAsync(__A0)
8586 #endif
8587  void
8589 
8602  OSErr
8604 
8618  OSErr
8620 
8658  OSStatus
8659  FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 maxPathSize);
8660 
8695  OSStatus
8696  FSPathMakeRef(const UInt8 *path, FSRef *ref,
8697  Boolean *isDirectory); /* can be NULL */
8698 
8708  typedef UInt32 FNMessage;
8709  enum
8710  {
8711  kFNDirectoryModifiedMessage = 1
8712  };
8713 
8737  OSStatus
8738  FNNotify(const FSRef *ref, FNMessage message, OptionBits flags);
8739 
8763  OSStatus
8764  FNNotifyByPath(const UInt8 *path, FNMessage message, OptionBits flags);
8765 
8788  OSStatus
8789  FNNotifyAll(FNMessage message, OptionBits flags);
8790 
8801  typedef struct OpaqueFNSubscriptionRef *FNSubscriptionRef;
8802 
8807  enum
8808  {
8809 
8816  kFNNoImplicitAllSubscription = (1 << 0)
8817  };
8818 
8840  typedef CALLBACK_API_C(void,
8841  FNSubscriptionProcPtr)(FNMessage message,
8842  OptionBits flags, void *refcon,
8843  FNSubscriptionRef subscription);
8844  typedef TVECTOR_UPP_TYPE(FNSubscriptionProcPtr) FNSubscriptionUPP;
8853  FNSubscriptionUPP
8854  NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine);
8855 #if !OPAQUE_UPP_TYPES
8856  enum
8857  {
8858  uppFNSubscriptionProcInfo = 0x00003FC1
8859  }; /* no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
8860 #ifdef __cplusplus
8861  inline FNSubscriptionUPP
8862  NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine)
8863  {
8864  return userRoutine;
8865  }
8866 #else
8867 #define NewFNSubscriptionUPP(userRoutine) (userRoutine)
8868 #endif
8869 #endif
8870 
8879  void
8880  DisposeFNSubscriptionUPP(FNSubscriptionUPP userUPP);
8881 #if !OPAQUE_UPP_TYPES
8882 #ifdef __cplusplus
8883  inline void DisposeFNSubscriptionUPP(FNSubscriptionUPP) {}
8884 #else
8885 #define DisposeFNSubscriptionUPP(userUPP)
8886 #endif
8887 #endif
8888 
8897  void
8898  InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags, void *refcon,
8899  FNSubscriptionRef subscription,
8900  FNSubscriptionUPP userUPP);
8901 #if !OPAQUE_UPP_TYPES
8902 #ifdef __cplusplus
8903  inline void InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags,
8904  void *refcon,
8905  FNSubscriptionRef subscription,
8906  FNSubscriptionUPP userUPP)
8907  {
8908  (*userUPP)(message, flags, refcon, subscription);
8909  }
8910 #else
8911 #define InvokeFNSubscriptionUPP(message, flags, refcon, subscription, userUPP) \
8912  (*userUPP)(message, flags, refcon, subscription)
8913 #endif
8914 #endif
8915 
8946  OSStatus
8947  FNSubscribe(const FSRef *directoryRef, FNSubscriptionUPP callback, void *refcon,
8948  OptionBits flags, FNSubscriptionRef *subscription);
8949 
8980  OSStatus
8981  FNSubscribeByPath(const UInt8 *directoryPath, FNSubscriptionUPP callback,
8982  void *refcon, OptionBits flags,
8983  FNSubscriptionRef *subscription);
8984 
9003  OSStatus
9005 
9031  OSStatus
9033 
9034 #if PRAGMA_STRUCT_ALIGN
9035 #pragma options align = reset
9036 #elif PRAGMA_STRUCT_PACKPUSH
9037 #pragma pack(pop)
9038 #elif PRAGMA_STRUCT_PACK
9039 #pragma pack()
9040 #endif
9041 
9042 #ifdef PRAGMA_IMPORT_OFF
9043 #pragma import off
9044 #elif PRAGMA_IMPORT
9045 #pragma import reset
9046 #endif
9047 
9048 #ifdef __cplusplus
9049 }
9050 #endif
9051 
9052 #endif /* __FILES__ */
9053 */< 0)
9054 }
9055 ;
9056 
9078 typedef CALLBACK_API_C(void,
9079  FNSubscriptionProcPtr)(FNMessage message,
9080  OptionBits flags, void *refcon,
9081  FNSubscriptionRef subscription);
9082 typedef TVECTOR_UPP_TYPE(FNSubscriptionProcPtr) FNSubscriptionUPP;
9091 FNSubscriptionUPP
9092 NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine);
9093 #if !OPAQUE_UPP_TYPES
9094 enum
9095 {
9096  uppFNSubscriptionProcInfo = 0x00003FC1
9097 }; /* no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
9098 #ifdef __cplusplus
9099 inline FNSubscriptionUPP
9100 NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine)
9101 {
9102  return userRoutine;
9103 }
9104 #else
9105 #define NewFNSubscriptionUPP(userRoutine) (userRoutine)
9106 #endif
9107 #endif
9108 
9117 void DisposeFNSubscriptionUPP(FNSubscriptionUPP userUPP);
9118 #if !OPAQUE_UPP_TYPES
9119 #ifdef __cplusplus
9120 inline void DisposeFNSubscriptionUPP(FNSubscriptionUPP) {}
9121 #else
9122 #define DisposeFNSubscriptionUPP(userUPP)
9123 #endif
9124 #endif
9125 
9134 void InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags, void *refcon,
9135  FNSubscriptionRef subscription,
9136  FNSubscriptionUPP userUPP);
9137 #if !OPAQUE_UPP_TYPES
9138 #ifdef __cplusplus
9139 inline void InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags,
9140  void *refcon,
9141  FNSubscriptionRef subscription,
9142  FNSubscriptionUPP userUPP)
9143 {
9144  (*userUPP)(message, flags, refcon, subscription);
9145 }
9146 #else
9147 #define InvokeFNSubscriptionUPP(message, flags, refcon, subscription, userUPP) \
9148  (*userUPP)(message, flags, refcon, subscription)
9149 #endif
9150 #endif
9151 
9182 OSStatus
9183 FNSubscribe(const FSRef *directoryRef, FNSubscriptionUPP callback, void *refcon,
9184  OptionBits flags, FNSubscriptionRef *subscription);
9185 
9216 OSStatus
9217 FNSubscribeByPath(const UInt8 *directoryPath, FNSubscriptionUPP callback,
9218  void *refcon, OptionBits flags,
9219  FNSubscriptionRef *subscription);
9220 
9239 OSStatus
9240 FNUnsubscribe(FNSubscriptionRef subscription);
9241 
9267 OSStatus
9269 
9270 #if PRAGMA_STRUCT_ALIGN
9271 #pragma options align = reset
9272 #elif PRAGMA_STRUCT_PACKPUSH
9273 #pragma pack(pop)
9274 #elif PRAGMA_STRUCT_PACK
9275 #pragma pack()
9276 #endif
9277 
9278 #ifdef PRAGMA_IMPORT_OFF
9279 #pragma import off
9280 #elif PRAGMA_IMPORT
9281 #pragma import reset
9282 #endif
9283 
9284 #ifdef __cplusplus
9285 }
9286 #endif
9287 
9288 #endif /* __FILES__ */
9289 * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/
OSErr PBHGetVolAsync(WDPBPtr paramBlock)
OSErr UnmountVol(ConstStr63Param volName, short vRefNum)
Flush volume, close its files, release its memory.
OSErr PBSetFPosSync(ParmBlkPtr paramBlock)
OSErr FSpSetFInfo(const FSSpec *spec, const FInfo *fndrInfo)
Set the Finder information.
OSErr PBAllocContigAsync(ParmBlkPtr paramBlock)
OSStatus FNUnsubscribe(FNSubscriptionRef subscription)
OSErr PBXGetVolInfoSync(XVolumeParamPtr paramBlock)
void PBSetCatalogInfoAsync(FSRefParam *paramBlock)
void PBMoveObjectAsync(FSRefParam *paramBlock)
OSErr HOpen(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission, short *refNum)
OSErr FSOpen(ConstStr255Param fileName, short vRefNum, short *refNum)
Open the data fork of an existing file.
OSErr PBAllocContigSync(ParmBlkPtr paramBlock)
OSErr PBAllocateAsync(ParmBlkPtr paramBlock)
OSErr PBCatalogSearchSync(FSCatalogBulkParam *paramBlock)
OSErr PBRenameUnicodeSync(FSRefParam *paramBlock)
OSErr PBSetFLockAsync(ParmBlkPtr paramBlock)
OSErr PBGetCatalogInfoBulkSync(FSCatalogBulkParam *paramBlock)
OSErr PBHMapIDSync(HParmBlkPtr paramBlock)
OSErr PBCatSearchAsync(CSParamPtr paramBlock)
void PBDeleteForkAsync(FSForkIOParam *paramBlock)
OSErr PBDTDeleteAsync(DTPBPtr paramBlock)
OSErr PBGetVolAsync(ParmBlkPtr paramBlock)
OSErr PBGetCatInfoAsync(CInfoPBPtr paramBlock)
OSErr unmountvol(const char *volName, short vRefNum)
void PBMakeFSRefAsync(FSRefParam *paramBlock)
OSErr PBGetForkPositionSync(FSForkIOParam *paramBlock)
OSErr PBUnlockRangeAsync(ParmBlkPtr paramBlock)
OSStatus FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 maxPathSize)
OSErr HSetFLock(short vRefNum, long dirID, ConstStr255Param fileName)
Lock a file (prevent changes, deletion, renaming, etc.)
OSErr PBUnmountVol(ParmBlkPtr paramBlock)
Flush volume, close its files, release its memory.
OSErr OpenWD(short vRefNum, long dirID, long procID, short *wdRefNum)
void PBRenameUnicodeAsync(FSRefParam *paramBlock)
typedef CALLBACK_API_C(void, FNSubscriptionProcPtr)(FNMessage message
void PBCloseIteratorAsync(FSCatalogBulkParam *paramBlock)
OSErr PBSetCatInfoAsync(CInfoPBPtr paramBlock)
OSErr PBGetFCBInfoSync(FCBPBPtr paramBlock)
void PBCreateForkAsync(FSForkIOParam *paramBlock)
OSErr PBHRstFLockSync(HParmBlkPtr paramBlock)
OSErr PBFlushFileSync(ParmBlkPtr paramBlock)
OSErr FSMakeFSRefUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, FSRef *newRef)
OSErr PBWriteForkSync(FSForkIOParam *paramBlock)
OSErr PBDTRemoveCommentAsync(DTPBPtr paramBlock)
OSErr PBGetFPosSync(ParmBlkPtr paramBlock)
OSErr PBRenameSync(ParmBlkPtr paramBlock)
OSErr getvinfo(short drvNum, char *volName, short *vRefNum, long *freeBytes)
OSErr FSpSetFLock(const FSSpec *spec)
Lock a file.
OSErr PBDeleteAsync(ParmBlkPtr paramBlock)
OSErr PBLockRangeAsync(ParmBlkPtr paramBlock)
OSStatus FSPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDirectory)
void PBWriteForkAsync(FSForkIOParam *paramBlock)
OSErr PBCreateFileIDRefAsync(HParmBlkPtr paramBlock)
OSErr PBExchangeFilesSync(HParmBlkPtr paramBlock)
OSErr PBGetVolMountInfoSize(ParmBlkPtr paramBlock)
PBGetVolMountInfoSize Determine space allocation for volume-mounting record.
OSErr FSFlushFork(SInt16 forkRefNum)
OSErr openrf(const char *fileName, short vRefNum, short *refNum)
OSErr PBDTGetIconSync(DTPBPtr paramBlock)
union ParamBlockRec ParamBlockRec
Definition: Files.h:467
OSErr PBDirCreateSync(HParmBlkPtr paramBlock)
OSErr GetWDInfo(short wdRefNum, short *vRefNum, long *dirID, long *procID)
Query information about an existing working directory.
OSErr PBHOpenDFSync(HParmBlkPtr paramBlock)
OSErr PBDirCreateAsync(HParmBlkPtr paramBlock)
short rc
Obtain the size of an open file (logical EOF)
Definition: Files.h:2664
OSErr PBOpenDFSync(ParmBlkPtr paramBlock)
OSErr FSDeleteFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName)
OSErr PBGetForeignPrivsAsync(HParmBlkPtr paramBlock)
OSErr PBRstFLockAsync(ParmBlkPtr paramBlock)
OSErr PBMakeFSRefUnicodeSync(FSRefParam *paramBlock)
OSErr PBSetVolSync(ParmBlkPtr paramBlock)
HIOParam * hipb
Definition: Files.h:1277
void PBGetForkPositionAsync(FSForkIOParam *paramBlock)
OSErr PBLockRangeSync(ParmBlkPtr paramBlock)
void DisposeIOCompletionUPP(IOCompletionUPP userUPP)
OSErr PBCreateSync(ParmBlkPtr paramBlock)
OSErr PBDTSetCommentAsync(DTPBPtr paramBlock)
OSErr PBSetForeignPrivsSync(HParmBlkPtr paramBlock)
OSErr HRstFLock(short vRefNum, long dirID, ConstStr255Param fileName)
Unlock a file (allow changes, deletion, renaming, etc.)
OSErr PBXGetVolInfoAsync(XVolumeParamPtr paramBlock)
void PBCatalogSearchAsync(FSCatalogBulkParam *paramBlock)
void PBSetForkSizeAsync(FSForkIOParam *paramBlock)
OSErr PBGetUGEntrySync(HParmBlkPtr paramBlock)
OSErr CloseWD(short wdRefNum)
Close and release a working directory.
Str255 volName
Get volume name, reference number and free bytes.
Definition: Files.h:2663
OSErr HOpenDF(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission, short *refNum)
OSErr Create(ConstStr255Param fileName, short vRefNum, OSType creator, OSType fileType)
a new empty file (data fork only)
OSErr PBFlushVolAsync(ParmBlkPtr paramBlock)
OSErr PBSetCatalogInfoSync(FSRefParam *paramBlock)
void PBSetForkPositionAsync(FSForkIOParam *paramBlock)
OSErr PBHCopyFileSync(HParmBlkPtr paramBlock)
OSErr PBAllocateSync(ParmBlkPtr paramBlock)
OSErr eject(const char *volName, short vRefNum)
OSErr FSWriteFork(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset, ByteCount requestCount, const void *buffer, ByteCount *actualCount)
OSErr PBHSetFInfoSync(HParmBlkPtr paramBlock)
OSErr PBOpenRFSync(ParmBlkPtr paramBlock)
OSErr AllocContig(short refNum, long *count)
Allocate contiguous space on disk.
OSErr PBHMoveRenameAsync(HParmBlkPtr paramBlock)
OSErr PBSetFLockSync(ParmBlkPtr paramBlock)
OSStatus FNSubscribeByPath(const UInt8 *directoryPath, FNSubscriptionUPP callback, void *refcon, OptionBits flags, FNSubscriptionRef *subscription)
OSErr FSSetForkSize(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset)
void PBSetVolumeInfoAsync(FSVolumeInfoParam *paramBlock)
OSErr PBHSetDirAccessSync(HParmBlkPtr paramBlock)
OSErr PBGetVolumeInfoSync(FSVolumeInfoParam *paramBlock)
OSErr FSpOpenRF(const FSSpec *spec, SInt8 permission, short *refNum)
OSErr PBDTResetAsync(DTPBPtr paramBlock)
OSErr PBCreateDirectoryUnicodeSync(FSRefParam *paramBlock)
OSErr SetFPos(short refNum, short posMode, long posOff)
Position file mark for random-access read/write.
OSErr FSSetVolumeInfo(FSVolumeRefNum volume, FSVolumeInfoBitmap whichInfo, const FSVolumeInfo *info)
OSErr getvol(char *volName, short *vRefNum)
OSErr PBHGetVInfoSync(HParmBlkPtr paramBlock)
OSErr FSGetDataForkName(HFSUniStr255 *dataForkName)
OSErr HRename(short vRefNum, long dirID, ConstStr255Param oldName, ConstStr255Param newName)
Rename a file, volume, or directory.
OSErr PBGetCatInfoSync(CInfoPBPtr paramBlock)
OSErr PBUnshareSync(HParmBlkPtr paramBlock)
OSErr PBRstFLockSync(ParmBlkPtr paramBlock)
WDParam wdParam
Definition: Files.h:1304
OSErr PBVolumeMount(ParmBlkPtr paramBlock)
void PBCreateFileUnicodeAsync(FSRefParam *paramBlock)
void PBFlushForkAsync(FSForkIOParam *paramBlock)
void PBOpenForkAsync(FSForkIOParam *paramBlock)
OSErr FSGetCatalogInfoBulk(FSIterator iterator, ItemCount maximumObjects, ItemCount *actualObjects, Boolean *containerChanged, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfos, FSRef *refs, FSSpec *specs, HFSUniStr255 *names)
OSErr PBHGetFInfoSync(HParmBlkPtr paramBlock)
OSErr PBCompareFSRefsSync(FSRefParam *paramBlock)
OSErr PBOpenIteratorSync(FSCatalogBulkParam *paramBlock)
OSErr PBDTGetCommentSync(DTPBPtr paramBlock)
OSErr PBIterateForksSync(FSForkIOParam *paramBlock)
void DisposeFNSubscriptionUPP(FNSubscriptionUPP userUPP)
OSErr FSCompareFSRefs(const FSRef *ref1, const FSRef *ref2)
OSErr PBGetXCatInfoAsync(XCInfoPBPtr paramBlock)
OSErr PBHRstFLockAsync(HParmBlkPtr paramBlock)
OSErr PBOffLine(ParmBlkPtr paramBlock)
OSErr Eject(ConstStr63Param volName, short vRefNum)
OSErr PBGetWDInfoAsync(WDPBPtr paramBlock)
OSErr create(const char *fileName, short vRefNum, OSType creator, OSType fileType)
OSErr PBHOpenDFAsync(HParmBlkPtr paramBlock)
OSErr PBGetEOFAsync(ParmBlkPtr paramBlock)
OSStatus FNGetDirectoryForSubscription(FNSubscriptionRef subscription, FSRef *ref)
OSErr PBSetForeignPrivsAsync(HParmBlkPtr paramBlock)
OSErr PBShareSync(HParmBlkPtr paramBlock)
OSErr PBGetVolSync(ParmBlkPtr paramBlock)
OSErr PBGetForkCBInfoSync(FSForkCBInfoParam *paramBlock)
OSErr PBHSetVolAsync(WDPBPtr paramBlock)
OSErr PBSetForkSizeSync(FSForkIOParam *paramBlock)
OSErr PBHOpenAsync(HParmBlkPtr paramBlock)
OSErr PBHGetDirAccessSync(HParmBlkPtr paramBlock)
ForeignPrivParam foreignPrivParam
Definition: Files.h:1307
OSErr PBHMapIDAsync(HParmBlkPtr paramBlock)
OSErr fsrename(const char *oldName, short vRefNum, const char *newName)
OSErr PBSetCatInfoSync(CInfoPBPtr paramBlock)
OSErr flushvol(const char *volName, short vRefNum)
OSErr PBShareAsync(HParmBlkPtr paramBlock)
OSErr PBDTGetIconInfoSync(DTPBPtr paramBlock)
OSErr FSClose(short refNum)
Close a file.
OSErr PBDTResetSync(DTPBPtr paramBlock)
void FInitQueue(void)
Clear enqueued File Manager calls.
OSErr PBSetForkPositionSync(FSForkIOParam *paramBlock)
OSErr PBSetFInfoSync(ParmBlkPtr paramBlock)
OSErr PBHGetVolParmsSync(HParmBlkPtr paramBlock)
void PBGetForkCBInfoAsync(FSForkCBInfoParam *paramBlock)
OSErr CatMove(short vRefNum, long dirID, ConstStr255Param oldName, long newDirID, ConstStr255Param newName)
Transfer file or directory to another directory on the same volume.
OSErr PBDTRemoveCommentSync(DTPBPtr paramBlock)
OSErr FSpDelete(const FSSpec *spec)
Remove a closed file.
OSErr PBGetForeignPrivsSync(HParmBlkPtr paramBlock)
OSErr FSpDirCreate(const FSSpec *spec, ScriptCode scriptTag, long *createdDirID)
Create a new directory.
OSStatus FNNotifyAll(FNMessage message, OptionBits flags)
void PBCreateDirectoryUnicodeAsync(FSRefParam *paramBlock)
OSErr PBGetEOFSync(ParmBlkPtr paramBlock)
OSErr PBHGetLogInInfoAsync(HParmBlkPtr paramBlock)
OSErr FSIterateForks(const FSRef *ref, CatPositionRec *forkIterator, HFSUniStr255 *forkName, SInt64 *forkSize, UInt64 *forkPhysicalSize)
FIDParam fidParam
Definition: Files.h:1305
OSErr FSMoveObject(const FSRef *ref, const FSRef *destDirectory, FSRef *newRef)
OSErr PBCatMoveSync(CMovePBPtr paramBlock)
OSErr GetFInfo(ConstStr255Param fileName, short vRefNum, FInfo *fndrInfo)
Obtain file type, creator, icon position, etc.
@ kFNNoImplicitAllSubscription
Definition: Files.h:8816
OSErr PBEject(ParmBlkPtr paramBlock)
OSErr PBOpenWDSync(WDPBPtr paramBlock)
OSErr HSetFInfo(short vRefNum, long dirID, ConstStr255Param fileName, const FInfo *fndrInfo)
Change file type, creator, icon position, etc.
OSErr PBGetVInfoAsync(ParmBlkPtr paramBlock)
OSErr FSGetVolumeInfo(FSVolumeRefNum volume, ItemCount volumeIndex, FSVolumeRefNum *actualVolume, FSVolumeInfoBitmap whichInfo, FSVolumeInfo *info, HFSUniStr255 *volumeName, FSRef *rootDirectory)
OSErr PBHOpenDenySync(HParmBlkPtr paramBlock)
OSErr HSetVol(ConstStr63Param volName, short vRefNum, long dirID)
Select a default default volume/directory (HFS only)
OSErr PBHGetFInfoAsync(HParmBlkPtr paramBlock)
OSErr HOpenRF(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission, short *refNum)
OSErr PBHMoveRenameSync(HParmBlkPtr paramBlock)
OSErr setfinfo(const char *fileName, short vRefNum, const FInfo *fndrInfo)
OSErr HGetFInfo(short vRefNum, long dirID, ConstStr255Param fileName, FInfo *fndrInfo)
Obtain file type, creator, icon position, etc.
FNSubscriptionUPP NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine)
OSErr PBSetFInfoAsync(ParmBlkPtr paramBlock)
OSErr PBMountVol(ParmBlkPtr paramBlock)
OSErr SetFLock(ConstStr255Param fileName, short vRefNum)
Lock a file (prevent changes, deletion, renaming, etc.)
OSErr FSGetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfo, HFSUniStr255 *outName, FSSpec *fsSpec, FSRef *parentRef)
OSErr PBGetVInfoSync(ParmBlkPtr paramBlock)
OSErr Rename(ConstStr255Param oldName, short vRefNum, ConstStr255Param newName)
Change the name of a file or directory.
OSErr PBExchangeFilesAsync(HParmBlkPtr paramBlock)
OSStatus FNSubscribe(const FSRef *directoryRef, FNSubscriptionUPP callback, void *refcon, OptionBits flags, FNSubscriptionRef *subscription)
OSErr PBMakeFSSpecAsync(HParmBlkPtr paramBlock)
OSErr PBUnshareAsync(HParmBlkPtr paramBlock)
OSErr PBDTSetCommentSync(DTPBPtr paramBlock)
OSErr FSRead(short refNum, long *count, void *buffPtr)
Read from an open file or device driver.
printf("First vcb is at = %lx\n", qhp->qHead)
Obtain pointer to the volume control block queue header.
OSErr PBHMapNameSync(HParmBlkPtr paramBlock)
void PBReadForkAsync(FSForkIOParam *paramBlock)
OSErr PBHRenameAsync(HParmBlkPtr paramBlock)
OSErr PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock)
CopyParam copyParam
Definition: Files.h:1303
void PBGetForkSizeAsync(FSForkIOParam *paramBlock)
void InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP)
OSErr PBGetFCBInfoAsync(FCBPBPtr paramBlock)
OSErr FSGetForkCBInfo(SInt16 desiredRefNum, FSVolumeRefNum volume, SInt16 *iterator, SInt16 *actualRefNum, FSForkInfo *forkInfo, FSRef *ref, HFSUniStr255 *outForkName)
OSErr PBHTrashVolumeCachesSync(ParmBlkPtr paramBlock)
OSErr PBHGetVolParmsAsync(HParmBlkPtr paramBlock)
OSErr PBHOpenSync(HParmBlkPtr paramBlock)
OSErr PBSetEOFSync(ParmBlkPtr paramBlock)
OSErr FSpOpenDF(const FSSpec *spec, SInt8 permission, short *refNum)
OSErr PBGetForkSizeSync(FSForkIOParam *paramBlock)
OSErr PBCreateFileUnicodeSync(FSRefParam *paramBlock)
OSErr PBDTAddAPPLAsync(DTPBPtr paramBlock)
OSErr setvol(const char *volName, short vRefNum)
OSErr PBHSetDirAccessAsync(HParmBlkPtr paramBlock)
OSErr FSGetResourceForkName(HFSUniStr255 *resourceForkName)
OSStatus FNNotifyByPath(const UInt8 *path, FNMessage message, OptionBits flags)
OSErr PBHOpenRFDenyAsync(HParmBlkPtr paramBlock)
OSErr FSAllocateFork(SInt16 forkRefNum, FSAllocationFlags flags, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount, UInt64 *actualCount)
OSErr HDelete(short vRefNum, long dirID, ConstStr255Param fileName)
Delete an unopened file or empty directory.
OSErr PBFlushFileAsync(ParmBlkPtr paramBlock)
ObjParam objParam
Definition: Files.h:1302
void PBAllocateForkAsync(FSForkIOParam *paramBlock)
OSErr GetVol(StringPtr volName, short *vRefNum)
Obtain name and reference number of default volume.
void PBGetCatalogInfoBulkAsync(FSCatalogBulkParam *paramBlock)
OSErr GetFPos(short refNum, long *filePos)
Obtain position of the file mark of an open file.
OSErr FSCloseFork(SInt16 forkRefNum)
OSErr rstflock(const char *fileName, short vRefNum)
OSErr FSSetForkPosition(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset)
OSErr PBCatMoveAsync(CMovePBPtr paramBlock)
OSErr PBGetUGEntryAsync(HParmBlkPtr paramBlock)
OSErr PBUnlockRangeSync(ParmBlkPtr paramBlock)
OSErr fsdelete(const char *fileName, short vRefNum)
OSErr PBFlushForkSync(FSForkIOParam *paramBlock)
OSErr PBDTGetAPPLSync(DTPBPtr paramBlock)
void PBExchangeObjectsAsync(FSRefParam *paramBlock)
OSErr PBHGetVInfoAsync(HParmBlkPtr paramBlock)
OSErr PBGetVolMountInfo(ParmBlkPtr paramBlock)
PBGetVolMountInfo Places volume mounting information into a buffer.
OSErr PBOpenRFAsync(ParmBlkPtr paramBlock)
OSErr PBDeleteFileIDRefSync(HParmBlkPtr paramBlock)
OSErr PBGetCatalogInfoSync(FSRefParam *paramBlock)
OSErr PBHCreateSync(HParmBlkPtr paramBlock)
QHdrPtr GetFSQHdr(void)
Obtain pointer to the file I/O queue header.
void PBGetVolumeInfoAsync(FSVolumeInfoParam *paramBlock)
OSErr PBDTGetIconInfoAsync(DTPBPtr paramBlock)
UInt32 FNMessage
Definition: Files.h:8708
OSErr getfinfo(const char *fileName, short vRefNum, FInfo *fndrInfo)
OSErr PBSetVInfoAsync(HParmBlkPtr paramBlock)
OSErr PBOpenDFAsync(ParmBlkPtr paramBlock)
OSErr PBDeleteSync(ParmBlkPtr paramBlock)
OSErr PBFlushVolSync(ParmBlkPtr paramBlock)
OSErr OpenRF(ConstStr255Param fileName, short vRefNum, short *refNum)
void PBCloseForkAsync(FSForkIOParam *paramBlock)
HFileParam fileParam
Definition: Files.h:1299
OSErr PBSetEOFAsync(ParmBlkPtr paramBlock)
OSErr PBHSetFLockAsync(HParmBlkPtr paramBlock)
OSErr FSRenameUnicode(const FSRef *ref, UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, FSRef *newRef)
OSErr FSReadFork(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset, ByteCount requestCount, void *buffer, ByteCount *actualCount)
CSParam csParam
Definition: Files.h:1306
OSErr PBMakeFSSpecSync(HParmBlkPtr paramBlock)
OSErr PBDTOpenInform(DTPBPtr paramBlock)
OSErr PBDTGetInfoAsync(DTPBPtr paramBlock)
OSErr SetFInfo(ConstStr255Param fileName, short vRefNum, const FInfo *fndrInfo)
Change file type, creator, icon position, etc.
OSErr PBResolveFileIDRefSync(HParmBlkPtr paramBlock)
OSErr FlushVol(ConstStr63Param volName, short vRefNum)
OSErr FSCreateFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName)
This attempts to extend the file by byte
Increase the physical size of an open file.
Definition: Files.h:3115
OSErr FSDeleteObject(const FSRef *ref)
OSErr PBCreateFileIDRefSync(HParmBlkPtr paramBlock)
OSErr PBHOpenRFDenySync(HParmBlkPtr paramBlock)
OSErr PBHGetDirAccessAsync(HParmBlkPtr paramBlock)
OSErr OpenDF(ConstStr255Param fileName, short vRefNum, short *refNum)
OSErr PBHOpenDenyAsync(HParmBlkPtr paramBlock)
OSErr PBDTFlushAsync(DTPBPtr paramBlock)
OSErr PBDTGetInfoSync(DTPBPtr paramBlock)
OSErr PBSetFPosAsync(ParmBlkPtr paramBlock)
OSStatus FNNotify(const FSRef *ref, FNMessage message, OptionBits flags)
OSErr PBMoveObjectSync(FSRefParam *paramBlock)
OSErr PBOpenWDAsync(WDPBPtr paramBlock)
OSErr PBDeleteForkSync(FSForkIOParam *paramBlock)
OSErr FSCreateDirectoryUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo, FSRef *newRef, FSSpec *newSpec, UInt32 *newDirID)
OSErr PBCloseForkSync(FSForkIOParam *paramBlock)
OSErr PBGetFPosAsync(ParmBlkPtr paramBlock)
OSErr PBDTGetPath(DTPBPtr paramBlock)
void PBCompareFSRefsAsync(FSRefParam *paramBlock)
OSErr PBSetVolumeInfoSync(FSVolumeInfoParam *paramBlock)
OSErr PBAllocateForkSync(FSForkIOParam *paramBlock)
OSErr DirCreate(short vRefNum, long parentDirID, ConstStr255Param directoryName, long *createdDirID)
Create a directory.
OSErr FSWrite(short refNum, long *count, const void *buffPtr)
Write data from memory to a file.
OSErr PBHGetLogInInfoSync(HParmBlkPtr paramBlock)
OSErr PBSetFVersSync(ParmBlkPtr paramBlock)
OSErr PBHGetVolSync(WDPBPtr paramBlock)
OSErr PBResolveFileIDRefAsync(HParmBlkPtr paramBlock)
OSErr PBSetFVersAsync(ParmBlkPtr paramBlock)
OSErr PBDTGetCommentAsync(DTPBPtr paramBlock)
OSErr PBGetXCatInfoSync(XCInfoPBPtr paramBlock)
OSErr FSpExchangeFiles(const FSSpec *source, const FSSpec *dest)
FSpExchangeFiles Swap the files' data.
OSErr PBCreateAsync(ParmBlkPtr paramBlock)
OSErr PBHSetFInfoAsync(HParmBlkPtr paramBlock)
void PBIterateForksAsync(FSForkIOParam *paramBlock)
OSErr FSpRstFLock(const FSSpec *spec)
Unlock a file.
OSErr PBCloseWDAsync(WDPBPtr paramBlock)
OSErr PBDTAddAPPLSync(DTPBPtr paramBlock)
OSErr PBHCopyFileAsync(HParmBlkPtr paramBlock)
OSErr PBHRenameSync(HParmBlkPtr paramBlock)
OSErr PBHSetFLockSync(HParmBlkPtr paramBlock)
OSErr FSCreateFileUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo, FSRef *newRef, FSSpec *newSpec)
OSErr PBDTGetAPPLAsync(DTPBPtr paramBlock)
OSErr PBExchangeObjectsSync(FSRefParam *paramBlock)
OSErr setflock(const char *fileName, short vRefNum)
OSErr PBSetVInfoSync(HParmBlkPtr paramBlock)
OSErr PBHDeleteSync(HParmBlkPtr paramBlock)
OSErr FSGetForkSize(SInt16 forkRefNum, SInt64 *forkSize)
OSErr FSpCatMove(const FSSpec *source, const FSSpec *dest)
Change a file's location.
OSErr PBHCreateAsync(HParmBlkPtr paramBlock)
OSErr PBCatSearchSync(CSParamPtr paramBlock)
void PBOpenIteratorAsync(FSCatalogBulkParam *paramBlock)
OSErr PBHMapNameAsync(HParmBlkPtr paramBlock)
OSErr HCreate(short vRefNum, long dirID, ConstStr255Param fileName, OSType creator, OSType fileType)
Create a new file like PB and set type and creator.
void PBGetCatalogInfoAsync(FSRefParam *paramBlock)
OSErr PBHOpenRFAsync(HParmBlkPtr paramBlock)
union HParamBlockRec HParamBlockRec
Definition: Files.h:1310
OSErr FSpGetFInfo(const FSSpec *spec, FInfo *fndrInfo)
Get Finder information.
OSErr PBCreateForkSync(FSForkIOParam *paramBlock)
OSErr PBDTDeleteSync(DTPBPtr paramBlock)
OSErr fsopen(const char *fileName, short vRefNum, short *refNum)
OSErr PBHDeleteAsync(HParmBlkPtr paramBlock)
AccessParam accessParam
Definition: Files.h:1301
OSErr PBHOpenRFSync(HParmBlkPtr paramBlock)
OSErr HGetVol(StringPtr volName, short *vRefNum, long *dirID)
Obtain default volume/directory name and reference.
OSErr PBDeleteObjectSync(FSRefParam *paramBlock)
struct OpaqueFNSubscriptionRef * FNSubscriptionRef
Definition: Files.h:8801
OSErr FSpMakeFSRef(const FSSpec *source, FSRef *newRef)
OSErr FSGetForkPosition(SInt16 forkRefNum, SInt64 *position)
OSErr FSSetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo)
OSErr PBDTGetIconAsync(DTPBPtr paramBlock)
OSErr PBGetFInfoAsync(ParmBlkPtr paramBlock)
OSErr FSExchangeObjects(const FSRef *ref, const FSRef *destRef)
void PBDeleteObjectAsync(FSRefParam *paramBlock)
OSErr RstFLock(ConstStr255Param fileName, short vRefNum)
Unlock a file (allow changes, deletion, renaming, etc.)
IOCompletionUPP NewIOCompletionUPP(IOCompletionProcPtr userRoutine)
OSErr PBDTAddIconAsync(DTPBPtr paramBlock)
OSErr FSMakeFSSpec(short vRefNum, long dirID, ConstStr255Param fileName, FSSpec *spec)
Convert a file or directory spec into an FSSpec record.
OSErr PBDTCloseDown(DTPBPtr paramBlock)
OSErr FSOpenFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName, SInt8 permissions, SInt16 *forkRefNum)
OSErr PBRenameAsync(ParmBlkPtr paramBlock)
OSErr PBHSetVolSync(WDPBPtr paramBlock)
OSErr PBReadForkSync(FSForkIOParam *paramBlock)
OSErr PBOpenForkSync(FSForkIOParam *paramBlock)
OSErr FSpCreate(const FSSpec *spec, OSType creator, OSType fileType, ScriptCode scriptTag)
Create a new file and set the type and creator.
OSErr GetVRefNum(short fileRefNum, short *vRefNum)
Get volume reference number of an open file.
OSErr PBDTRemoveAPPLAsync(DTPBPtr paramBlock)
OSErr PBDTRemoveAPPLSync(DTPBPtr paramBlock)
OSErr PBGetWDInfoSync(WDPBPtr paramBlock)
OSErr FSpRename(const FSSpec *spec, ConstStr255Param newName)
Change a file's name.
OSErr PBGetFInfoSync(ParmBlkPtr paramBlock)
OSErr PBCloseWDSync(WDPBPtr paramBlock)
OSErr PBUnmountVolImmed(ParmBlkPtr paramBlock)
OSErr PBDTAddIconSync(DTPBPtr paramBlock)
OSErr PBCloseIteratorSync(FSCatalogBulkParam *paramBlock)
OSErr PBDTFlushSync(DTPBPtr paramBlock)
OSErr FSCloseIterator(FSIterator iterator)
OSErr FSCatalogSearch(FSIterator iterator, const FSSearchParams *searchCriteria, ItemCount maximumObjects, ItemCount *actualObjects, Boolean *containerChanged, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfos, FSRef *refs, FSSpec *specs, HFSUniStr255 *names)
void InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags, void *refcon, FNSubscriptionRef subscription, FNSubscriptionUPP userUPP)
OSErr FSOpenIterator(const FSRef *container, FSIteratorFlags iteratorFlags, FSIterator *iterator)
HVolumeParam volumeParam
Definition: Files.h:1300
OSErr PBSetVolAsync(ParmBlkPtr paramBlock)
OSErr PBMakeFSRefSync(FSRefParam *paramBlock)
void PBMakeFSRefUnicodeAsync(FSRefParam *paramBlock)
OSErr SetEOF(short refNum, long logEOF)
Increase or decrease the logical size of a file.
Finder flags and container types.
Handle NewHandle(Size byteCount)
Basic Macintosh data types.
Str255 StrFileName
Definition: MacTypes.h:474
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
OS Utilities Interfaces.
typedef CALLBACK_API_REGISTER68K(void, SIInterruptProcPtr,(SPBPtr inParamPtr, Ptr dataBuffer, short peakAmplitude, long sampleSize))
TextEncoding-related types and constants, and prototypes for related functions.
typedef REGISTER_UPP_TYPE(HighHookProcPtr) HighHookUPP
Interface for UTC to Local Time conversion and 64 Bit Clock routines.
Definition: AEDataModel.h:175
Definition: ATA.h:616
Definition: Files.h:1315
Definition: Files.h:555
Definition: Finder.h:334
Definition: Finder.h:349
Definition: Files.h:682
Definition: Files.h:1429
Definition: Files.h:1353
Definition: Finder.h:303
Definition: Files.h:6716
Definition: Files.h:6621
Definition: Files.h:6799
Definition: Files.h:6752
Definition: Files.h:6784
Definition: Files.h:6545
Definition: Files.h:6653
Definition: Files.h:6527
Definition: Files.h:6705
Definition: Files.h:6894
Definition: Files.h:6858
Definition: Finder.h:319
Definition: Files.h:497
Definition: Files.h:451
Definition: Files.h:70
Definition: Files.h:650
Definition: Files.h:474
Definition: Quickdraw.h:306
Definition: Files.h:591
Definition: OSUtils.h:131
Definition: OSUtils.h:154
Definition: Files.h:571
Definition: UTCUtils.h:60
Definition: MacTypes.h:110
Definition: Files.h:1379
Definition: Files.h:526
Definition: Files.h:1334
Definition: MacTypes.h:104
Definition: Files.h:640
VolumeParam volumeParam
Definition: Files.h:643
IOParam ioParam
Definition: Files.h:641
FileParam fileParam
Definition: Files.h:642