MoreFilesExtras.h

Go to the documentation of this file.
00001 
00002 /*  $Id: MoreFilesExtras.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /*
00005 **  Apple Macintosh Developer Technical Support
00006 **
00007 **  A collection of useful high-level File Manager routines.
00008 **
00009 **  by Jim Luther, Apple Developer Technical Support Emeritus
00010 **
00011 **  File:       MoreFilesExtras.h
00012 **
00013 **  Copyright © 1992-1999 Apple Computer, Inc.
00014 **  All rights reserved.
00015 **
00016 **  You may incorporate this sample code into your applications without
00017 **  restriction, though the sample code has been provided "AS IS" and the
00018 **  responsibility for its operation is 100% yours.  However, what you are
00019 **  not permitted to do is to redistribute the source as "DSC Sample Code"
00020 **  after having made changes. If you're going to re-distribute the source,
00021 **  we require that you make it clear in the source that the code was
00022 **  descended from Apple Sample Code, but that you've made changes.
00023 */
00024 
00025 #ifndef __MOREFILESEXTRAS__
00026 #define __MOREFILESEXTRAS__
00027 
00028 #include <Types.h>
00029 #include <Files.h>
00030 
00031 #include "Optimization.h"
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 /*****************************************************************************/
00038 
00039 /*
00040 **  Macros to get information out of GetVolParmsInfoBuffer
00041 */
00042 
00043 /* version 1 field getters */
00044 #define GetVolParmsInfoVersion(volParms) \
00045         ((volParms).vMVersion)
00046 #define GetVolParmsInfoAttrib(volParms) \
00047         ((volParms).vMAttrib)
00048 #define GetVolParmsInfoLocalHand(volParms) \
00049         ((volParms).vMLocalHand)
00050 #define GetVolParmsInfoServerAdr(volParms) \
00051         ((volParms).vMServerAdr)
00052 /* version 2 field getters (assume zero result if not version >= 2) */
00053 #define GetVolParmsInfoVolumeGrade(volParms) \
00054         (((volParms).vMVersion >= 2) ? (volParms).vMVolumeGrade : 0)
00055 #define GetVolParmsInfoForeignPrivID(volParms) \
00056         (((volParms).vMVersion >= 2) ? (volParms).vMForeignPrivID : 0)
00057 /* version 3 field getters (assume zero result if not version >= 3) */
00058 #define GetVolParmsInfoExtendedAttributes(volParms) \
00059         (((volParms).vMVersion >= 3) ? (volParms).vMExtendedAttributes : 0)
00060 
00061 /* attribute bits supported by all versions of GetVolParmsInfoBuffer */
00062 #define isNetworkVolume(volParms)   ((volParms).vMServerAdr != 0)
00063 #define hasLimitFCBs(volParms)      (((volParms).vMAttrib & (1L << bLimitFCBs)) != 0)
00064 #define hasLocalWList(volParms)     (((volParms).vMAttrib & (1L << bLocalWList)) != 0)
00065 #define hasNoMiniFndr(volParms)     (((volParms).vMAttrib & (1L << bNoMiniFndr)) != 0)
00066 #define hasNoVNEdit(volParms)       (((volParms).vMAttrib & (1L << bNoVNEdit)) != 0)
00067 #define hasNoLclSync(volParms)      (((volParms).vMAttrib & (1L << bNoLclSync)) != 0)
00068 #define hasTrshOffLine(volParms)    (((volParms).vMAttrib & (1L << bTrshOffLine)) != 0)
00069 #define hasNoSwitchTo(volParms)     (((volParms).vMAttrib & (1L << bNoSwitchTo)) != 0)
00070 #define hasNoDeskItems(volParms)    (((volParms).vMAttrib & (1L << bNoDeskItems)) != 0)
00071 #define hasNoBootBlks(volParms)     (((volParms).vMAttrib & (1L << bNoBootBlks)) != 0)
00072 #define hasAccessCntl(volParms)     (((volParms).vMAttrib & (1L << bAccessCntl)) != 0)
00073 #define hasNoSysDir(volParms)       (((volParms).vMAttrib & (1L << bNoSysDir)) != 0)
00074 #define hasExtFSVol(volParms)       (((volParms).vMAttrib & (1L << bHasExtFSVol)) != 0)
00075 #define hasOpenDeny(volParms)       (((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0)
00076 #define hasCopyFile(volParms)       (((volParms).vMAttrib & (1L << bHasCopyFile)) != 0)
00077 #define hasMoveRename(volParms)     (((volParms).vMAttrib & (1L << bHasMoveRename)) != 0)
00078 #define hasDesktopMgr(volParms)     (((volParms).vMAttrib & (1L << bHasDesktopMgr)) != 0)
00079 #define hasShortName(volParms)      (((volParms).vMAttrib & (1L << bHasShortName)) != 0)
00080 #define hasFolderLock(volParms)     (((volParms).vMAttrib & (1L << bHasFolderLock)) != 0)
00081 #define hasPersonalAccessPrivileges(volParms) \
00082         (((volParms).vMAttrib & (1L << bHasPersonalAccessPrivileges)) != 0)
00083 #define hasUserGroupList(volParms)  (((volParms).vMAttrib & (1L << bHasUserGroupList)) != 0)
00084 #define hasCatSearch(volParms)      (((volParms).vMAttrib & (1L << bHasCatSearch)) != 0)
00085 #define hasFileIDs(volParms)        (((volParms).vMAttrib & (1L << bHasFileIDs)) != 0)
00086 #define hasBTreeMgr(volParms)       (((volParms).vMAttrib & (1L << bHasBTreeMgr)) != 0)
00087 #define hasBlankAccessPrivileges(volParms) \
00088         (((volParms).vMAttrib & (1L << bHasBlankAccessPrivileges)) != 0)
00089 #define supportsAsyncRequests(volParms) \
00090         (((volParms).vMAttrib & (1L << bSupportsAsyncRequests)) != 0)
00091 #define supportsTrashVolumeCache(volParms) \
00092         (((volParms).vMAttrib & (1L << bSupportsTrashVolumeCache)) != 0)
00093 
00094 /* attribute bits supported by version 3 and greater versions of GetVolParmsInfoBuffer */
00095 #define volIsEjectable(volParms) \
00096         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bIsEjectable)) != 0)
00097 #define volSupportsHFSPlusAPIs(volParms) \
00098         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsHFSPlusAPIs)) != 0)
00099 #define volSupportsFSCatalogSearch(volParms) \
00100         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsFSCatalogSearch)) != 0)
00101 #define volSupportsFSExchangeObjects(volParms) \
00102         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsFSExchangeObjects)) != 0)
00103 #define volSupports2TBFiles(volParms) \
00104         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupports2TBFiles)) != 0)
00105 #define volSupportsLongNames(volParms) \
00106         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsLongNames)) != 0)
00107 #define volSupportsMultiScriptNames(volParms) \
00108         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsMultiScriptNames)) != 0)
00109 #define volSupportsNamedForks(volParms) \
00110         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsNamedForks)) != 0)
00111 #define volSupportsSubtreeIterators(volParms) \
00112         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsSubtreeIterators)) != 0)
00113 #define volL2PCanMapFileBlocks(volParms) \
00114         ((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bL2PCanMapFileBlocks)) != 0)
00115 
00116 /*****************************************************************************/
00117 
00118 /*
00119 **  Bit masks and macros to get common information out of ioACUser returned
00120 **  by PBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo
00121 **  since some file systems don't bother to set this field).
00122 **
00123 **  Use the GetDirAccessRestrictions or FSpGetDirAccessRestrictions
00124 **  functions to retrieve the ioACUser access restrictions byte for
00125 **  a folder.
00126 **
00127 **  Note:   The access restriction byte returned by PBGetCatInfo is the
00128 **          2's complement of the user's privileges byte returned in
00129 **          ioACAccess by PBHGetDirAccess.
00130 */
00131 
00132 enum
00133 {
00134     /* mask for just the access restriction bits */
00135     acUserAccessMask        = (kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask + kioACUserNoMakeChangesMask),
00136     
00137     /* common access privilege settings */
00138     acUserFull              = 0x00,                     /* no access restiction bits on */
00139     acUserNone              = acUserAccessMask,         /* all access restiction bits on */
00140     acUserDropBox           = kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask, /* make changes, but not see files or folders */
00141     acUserBulletinBoard     = kioACUserNoMakeChangesMask /* see files and folders, but not make changes */
00142 };
00143 
00144 /* Macros for testing ioACUser bits */
00145 #define userIsOwner(ioACUser)   \
00146         (((ioACUser) & kioACUserNotOwnerMask) == 0)
00147 #define userHasFullAccess(ioACUser) \
00148         (((ioACUser) & (acUserAccessMask)) == acUserFull)
00149 #define userHasDropBoxAccess(ioACUser)  \
00150         (((ioACUser) & acUserAccessMask) == acUserDropBox)
00151 #define userHasBulletinBoard(ioACUser)  \
00152         (((ioACUser) & acUserAccessMask) == acUserBulletinBoard)
00153 #define userHasNoAccess(ioACUser)       \
00154         (((ioACUser) & acUserAccessMask) == acUserNone)
00155 
00156 /*****************************************************************************/
00157 
00158 /*
00159 **  Deny mode permissions for use with the HOpenAware, HOpenRFAware,
00160 **  FSpOpenAware, and FSpOpenRFAware functions.
00161 **  Note: Common settings are the ones with comments.
00162 */
00163 
00164 enum
00165 {
00166     dmNone          = 0x0000,
00167     dmNoneDenyRd    = fsRdDenyPerm,
00168     dmNoneDenyWr    = fsWrDenyPerm,
00169     dmNoneDenyRdWr  = (fsRdDenyPerm + fsWrDenyPerm),
00170     dmRd            = fsRdPerm,                     /* Single writer, multiple readers; the readers */
00171     dmRdDenyRd      = (fsRdPerm + fsRdDenyPerm),
00172     dmRdDenyWr      = (fsRdPerm + fsWrDenyPerm),    /* Browsing - equivalent to fsRdPerm */
00173     dmRdDenyRdWr    = (fsRdPerm + fsRdDenyPerm + fsWrDenyPerm),
00174     dmWr            = fsWrPerm,
00175     dmWrDenyRd      = (fsWrPerm + fsRdDenyPerm),
00176     dmWrDenyWr      = (fsWrPerm + fsWrDenyPerm),
00177     dmWrDenyRdWr    = (fsWrPerm + fsRdDenyPerm + fsWrDenyPerm),
00178     dmRdWr          = fsRdWrPerm,                   /* Shared access - equivalent to fsRdWrShPerm */
00179     dmRdWrDenyRd    = (fsRdWrPerm + fsRdDenyPerm),
00180     dmRdWrDenyWr    = (fsRdWrPerm + fsWrDenyPerm),  /* Single writer, multiple readers; the writer */
00181     dmRdWrDenyRdWr  = (fsRdWrPerm + fsRdDenyPerm + fsWrDenyPerm) /* Exclusive access - equivalent to fsRdWrPerm */
00182 };
00183     
00184 /*****************************************************************************/
00185 
00186 #if PRAGMA_STRUCT_ALIGN
00187 #pragma options align=mac68k
00188 #endif
00189 
00190 /*
00191 **  For those times where you need to use more than one kind of File Manager parameter
00192 **  block but don't feel like wasting stack space, here's a parameter block you can reuse.
00193 */
00194 
00195 union UniversalFMPB
00196 {
00197     ParamBlockRec   PB;
00198     CInfoPBRec      ciPB;
00199     DTPBRec         dtPB;
00200     HParamBlockRec  hPB;
00201     CMovePBRec      cmPB;
00202     WDPBRec         wdPB;
00203     FCBPBRec        fcbPB;
00204     XVolumeParam    xPB;
00205 };
00206 typedef union UniversalFMPB UniversalFMPB;
00207 typedef UniversalFMPB *UniversalFMPBPtr, **UniversalFMPBHandle;
00208 
00209 
00210 /*
00211 **  Used by GetUGEntries to return user or group lists
00212 */
00213 
00214 struct UGEntry
00215 {
00216     short   objType;    /* object type: -1 = group; 0 = user */
00217     long    objID;      /* the user or group ID */
00218     Str31   name;       /* the user or group name */
00219 };
00220 typedef struct UGEntry UGEntry;
00221 typedef UGEntry *UGEntryPtr, **UGEntryHandle;
00222 
00223 
00224 typedef unsigned char Str8[9];
00225 
00226 
00227 /*
00228 **  I use the following records instead of the AFPVolMountInfo and AFPXVolMountInfo structures in Files.h
00229 */
00230 
00231 struct MyAFPVolMountInfo
00232 {
00233     short length;               /* length of this record */
00234     VolumeType media;           /* type of media, always AppleShareMediaType */
00235     short flags;                /* 0 = normal mount; set bit 0 to inhibit greeting messages */
00236     char nbpInterval;           /* NBP interval parameter; 7 is a good choice */
00237     char nbpCount;              /* NBP count parameter; 5 is a good choice */
00238     short uamType;              /* User Authentication Method */
00239     short zoneNameOffset;       /* offset from start of record to zoneName */
00240     short serverNameOffset;     /* offset from start of record to serverName */
00241     short volNameOffset;        /* offset from start of record to volName */
00242     short userNameOffset;       /* offset from start of record to userName */
00243     short userPasswordOffset;   /* offset from start of record to userPassword */
00244     short volPasswordOffset;    /* offset from start of record to volPassword */
00245     Str32 zoneName;             /* server's AppleTalk zone name */                  
00246     char filler1;               /* to word align volPassword */
00247     Str32 serverName;           /* server name */                   
00248     char filler2;               /* to word align volPassword */
00249     Str27 volName;              /* volume name */                   
00250     Str31 userName;             /* user name (zero length Pascal string for guest) */
00251     Str8 userPassword;          /* user password (zero length Pascal string if no user password) */                 
00252     char filler3;               /* to word align volPassword */
00253     Str8 volPassword;           /* volume password (zero length Pascal string if no volume password) */                 
00254     char filler4;               /* to end record on word boundry */
00255 };
00256 typedef struct MyAFPVolMountInfo MyAFPVolMountInfo;
00257 typedef MyAFPVolMountInfo *MyAFPVolMountInfoPtr, **MyAFPVolMountInfoHandle;
00258 
00259 struct MyAFPXVolMountInfo
00260 {
00261     short length;               /* length of this record */
00262     VolumeType media;           /* type of media, always AppleShareMediaType */
00263     short flags;                /* bits for no messages, no reconnect, etc */
00264     char nbpInterval;           /* NBP interval parameter; 7 is a good choice */
00265     char nbpCount;              /* NBP count parameter; 5 is a good choice */
00266     short uamType;              /* User Authentication Method */
00267     short zoneNameOffset;       /* offset from start of record to zoneName */
00268     short serverNameOffset;     /* offset from start of record to serverName */
00269     short volNameOffset;        /* offset from start of record to volName */
00270     short userNameOffset;       /* offset from start of record to userName */
00271     short userPasswordOffset;   /* offset from start of record to userPassword */
00272     short volPasswordOffset;    /* offset from start of record to volPassword */
00273     short extendedFlags;        /* extended flags word */
00274     short uamNameOffset;        /* offset to a pascal UAM name string */
00275     short alternateAddressOffset; /* offset to Alternate Addresses in tagged format */
00276     Str32 zoneName;             /* server's AppleTalk zone name */                  
00277     char filler1;               /* to word align volPassword */
00278     Str32 serverName;           /* server name */                   
00279     char filler2;               /* to word align volPassword */
00280     Str27 volName;              /* volume name */                   
00281     Str31 userName;             /* user name (zero length Pascal string for guest) */
00282     Str8 userPassword;          /* user password (zero length Pascal string if no user password) */                 
00283     char filler3;               /* to word align volPassword */
00284     Str8 volPassword;           /* volume password (zero length Pascal string if no volume password) */                 
00285     char filler4;               /* to word align uamNameOffset */
00286     Str32 uamName;              /* UAM name */
00287     char filler5;               /* to word align alternateAddress */
00288     char alternateAddress[kVariableLengthArray];    /* AFPAlternateAddress */
00289 };
00290 typedef struct MyAFPXVolMountInfo MyAFPXVolMountInfo;
00291 typedef MyAFPXVolMountInfo *MyAFPXVolMountInfoPtr, **MyAFPXVolMountInfoHandle;
00292 
00293 #if PRAGMA_STRUCT_ALIGN
00294 #pragma options align=reset
00295 #endif
00296 
00297 /*****************************************************************************/
00298 
00299 pascal  void    TruncPString(StringPtr destination,
00300                              ConstStr255Param source,
00301                              short maxLength);
00302 /*  ¶ International friendly string truncate routine.
00303     The TruncPString function copies up to maxLength characters from
00304     the source Pascal string to the destination Pascal string. TruncPString
00305     ensures that the truncated string ends on a single-byte character, or on
00306     the last byte of a multi-byte character.
00307     
00308     destination     output: destination Pascal string.
00309     source          input:  source Pascal string.
00310     maxLength       output: The maximum allowable length of the destination
00311                             string.
00312 */
00313 
00314 /*****************************************************************************/
00315 
00316 pascal  Ptr GetTempBuffer(long buffReqSize,
00317                           long *buffActSize);
00318 /*  ¶ Allocate a temporary copy or search buffer.
00319     The GetTempBuffer function allocates a temporary buffer for file system
00320     operations which is at least 1024 bytes (1K) and a multiple of
00321     1024 bytes.
00322     
00323     buffReqSize     input:  Size you'd like the buffer to be.
00324     buffActSize     output: Size of buffer allocated.
00325     function result output: Pointer to memory allocated or nil if no memory
00326                             was available. The caller is responsible for
00327                             disposing of this buffer with DisposePtr.
00328 */
00329 
00330 /*****************************************************************************/
00331 
00332 pascal  OSErr   GetVolumeInfoNoName(ConstStr255Param pathname,
00333                                     short vRefNum,
00334                                     HParmBlkPtr pb);
00335 /*  ¶ Call PBHGetVInfoSync ignoring returned name.
00336     GetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync
00337     in cases where the returned volume name is not needed by the caller.
00338     The pathname and vRefNum parameters are not touched, and the pb
00339     parameter is initialized by PBHGetVInfoSync except that ioNamePtr in
00340     the parameter block is always returned as NULL (since it might point
00341     to GetVolumeInfoNoName's local variable tempPathname).
00342 
00343     I noticed using this code in several places, so here it is once.
00344     This reduces the code size of MoreFiles.
00345 
00346     pathName    input:  Pointer to a full pathname or nil.  If you pass in a 
00347                         partial pathname, it is ignored. A full pathname to a
00348                         volume must end with a colon character (:).
00349     vRefNum     input:  Volume specification (volume reference number, working
00350                         directory number, drive number, or 0).
00351     pb          input:  A pointer to HParamBlockRec.
00352                 output: The parameter block as filled in by PBHGetVInfoSync
00353                         except that ioNamePtr will always be NULL.
00354     
00355     Result Codes
00356         noErr               0       No error
00357         nsvErr              -35     No such volume
00358         paramErr            -50     No default volume, or pb was NULL
00359 */
00360 
00361 /*****************************************************************************/
00362 
00363 pascal  OSErr   XGetVolumeInfoNoName(ConstStr255Param pathname,
00364                                     short vRefNum,
00365                                     XVolumeParamPtr pb);
00366 /*  ¶ Call PBXGetVolInfoSync ignoring returned name.
00367     XGetVolumeInfoNoName uses pathname and vRefNum to call PBXGetVolInfoSync
00368     in cases where the returned volume name is not needed by the caller.
00369     The pathname and vRefNum parameters are not touched, and the pb
00370     parameter is initialized by PBXGetVolInfoSync except that ioNamePtr in
00371     the parameter block is always returned as NULL (since it might point
00372     to XGetVolumeInfoNoName's local variable tempPathname).
00373 
00374     pathName    input:  Pointer to a full pathname or nil.  If you pass in a 
00375                         partial pathname, it is ignored. A full pathname to a
00376                         volume must end with a colon character (:).
00377     vRefNum     input:  Volume specification (volume reference number, working
00378                         directory number, drive number, or 0).
00379     pb          input:  A pointer to HParamBlockRec.
00380                 output: The parameter block as filled in by PBXGetVolInfoSync
00381                         except that ioNamePtr will always be NULL.
00382     
00383     Result Codes
00384         noErr               0       No error
00385         nsvErr              -35     No such volume
00386         paramErr            -50     No default volume, or pb was NULL
00387 */
00388 
00389 /*****************************************************************************/
00390 
00391 pascal  OSErr GetCatInfoNoName(short vRefNum,
00392                                long dirID,
00393                                ConstStr255Param name,
00394                                CInfoPBPtr pb);
00395 /*  ¶ Call PBGetCatInfoSync ignoring returned name.
00396     GetCatInfoNoName uses vRefNum, dirID and name to call PBGetCatInfoSync
00397     in cases where the returned object is not needed by the caller.
00398     The vRefNum, dirID and name parameters are not touched, and the pb
00399     parameter is initialized by PBGetCatInfoSync except that ioNamePtr in
00400     the parameter block is always returned as NULL (since it might point
00401     to GetCatInfoNoName's local variable tempName).
00402 
00403     I noticed using this code in several places, so here it is once.
00404     This reduces the code size of MoreFiles.
00405 
00406     vRefNum         input:  Volume specification.
00407     dirID           input:  Directory ID.
00408     name            input:  Pointer to object name, or nil when dirID
00409                             specifies a directory that's the object.
00410     pb              input:  A pointer to CInfoPBRec.
00411                     output: The parameter block as filled in by
00412                             PBGetCatInfoSync except that ioNamePtr will
00413                             always be NULL.
00414     
00415     Result Codes
00416         noErr               0       No error
00417         nsvErr              -35     No such volume
00418         ioErr               -36     I/O error
00419         bdNamErr            -37     Bad filename
00420         fnfErr              -43     File not found
00421         paramErr            -50     No default volume
00422         dirNFErr            -120    Directory not found or incomplete pathname
00423         afpAccessDenied     -5000   User does not have the correct access
00424         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
00425         
00426 */
00427 
00428 /*****************************************************************************/
00429 
00430 pascal  OSErr   DetermineVRefNum(ConstStr255Param pathname,
00431                                  short vRefNum,
00432                                  short *realVRefNum);
00433 /*  ¶ Determine the real volume reference number.
00434     The DetermineVRefNum function determines the volume reference number of
00435     a volume from a pathname, a volume specification, or a combination
00436     of the two.
00437     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
00438     mounted volumes can have the same name. For this reason, the use of a
00439     volume name or full pathname to identify a specific volume may not
00440     produce the results you expect.  If more than one volume has the same
00441     name and a volume name or full pathname is used, the File Manager
00442     currently uses the first volume it finds with a matching name in the
00443     volume queue.
00444 
00445     pathName    input:  Pointer to a full pathname or nil.  If you pass in a 
00446                         partial pathname, it is ignored. A full pathname to a
00447                         volume must end with a colon character (:).
00448     vRefNum     input:  Volume specification (volume reference number, working
00449                         directory number, drive number, or 0).
00450     realVRefNum output: The real volume reference number.
00451     
00452     Result Codes
00453         noErr               0       No error
00454         nsvErr              -35     No such volume
00455         paramErr            -50     No default volume
00456 */
00457 
00458 /*****************************************************************************/
00459 
00460 pascal  OSErr   HGetVInfo(short volReference,
00461                           StringPtr volName,
00462                           short *vRefNum,
00463                           unsigned long *freeBytes,
00464                           unsigned long *totalBytes);
00465 /*  ¶ Get information about a mounted volume.
00466     The HGetVInfo function returns the name, volume reference number,
00467     available space (in bytes), and total space (in bytes) for the
00468     specified volume. You can specify the volume by providing its drive
00469     number, volume reference number, or 0 for the default volume.
00470     This routine is compatible with volumes up to 4 gigabytes.
00471     
00472     volReference    input:  The drive number, volume reference number,
00473                             or 0 for the default volume.
00474     volName         input:  A pointer to a buffer (minimum Str27) where
00475                             the volume name is to be returned or must
00476                             be nil.
00477                     output: The volume name.
00478     vRefNum         output: The volume reference number.
00479     freeBytes       output: The number of free bytes on the volume.
00480                             freeBytes is an unsigned long value.
00481     totalBytes      output: The total number of bytes on the volume.
00482                             totalBytes is an unsigned long value.
00483     
00484     Result Codes
00485         noErr               0       No error
00486         nsvErr              -35     No such volume
00487         paramErr            -50     No default volume
00488     
00489     __________
00490     
00491     Also see:   XGetVInfo
00492 */
00493 
00494 /*****************************************************************************/
00495 
00496 pascal  OSErr   XGetVInfo(short volReference,
00497                           StringPtr volName,
00498                           short *vRefNum,
00499                           UInt64 *freeBytes,
00500                           UInt64 *totalBytes);
00501 /*  ¶ Get extended information about a mounted volume.
00502     The XGetVInfo function returns the name, volume reference number,
00503     available space (in bytes), and total space (in bytes) for the
00504     specified volume. You can specify the volume by providing its drive
00505     number, volume reference number, or 0 for the default volume.
00506     This routine is compatible with volumes up to 2 terabytes.
00507     
00508     volReference    input:  The drive number, volume reference number,
00509                             or 0 for the default volume.
00510     volName         input:  A pointer to a buffer (minimum Str27) where
00511                             the volume name is to be returned or must
00512                             be nil.
00513                     output: The volume name.
00514     vRefNum         output: The volume reference number.
00515     freeBytes       output: The number of free bytes on the volume.
00516                             freeBytes is an UnsignedWide value.
00517     totalBytes      output: The total number of bytes on the volume.
00518                             totalBytes is an UnsignedWide value.
00519     
00520     Result Codes
00521         noErr               0       No error
00522         nsvErr              -35     No such volume
00523         paramErr            -50     No default volume
00524     
00525     __________
00526     
00527     Also see:   HGetVInfo
00528 */
00529 
00530 /*****************************************************************************/
00531 
00532 pascal  OSErr   CheckVolLock(ConstStr255Param pathname,
00533                              short vRefNum);
00534 /*  ¶ Determine if a volume is locked.
00535     The CheckVolLock function determines if a volume is locked - either by
00536     hardware or by software. If CheckVolLock returns noErr, then the volume
00537     is not locked.
00538 
00539     pathName    input:  Pointer to a full pathname or nil.  If you pass in a 
00540                         partial pathname, it is ignored. A full pathname to a
00541                         volume must end with a colon character (:).
00542     vRefNum     input:  Volume specification (volume reference number, working
00543                         directory number, drive number, or 0).
00544     
00545     Result Codes
00546         noErr               0       No error - volume not locked
00547         nsvErr              -35     No such volume
00548         wPrErr              -44     Volume locked by hardware
00549         vLckdErr            -46     Volume locked by software
00550         paramErr            -50     No default volume
00551 */
00552 
00553 /*****************************************************************************/
00554 //
00555 //  The following routines call Mac OS routines that are not supported by
00556 //  Carbon:
00557 //  
00558 //      GetDriverName
00559 //      FindDrive
00560 //      GetDiskBlocks
00561 //      GetVolState
00562 
00563 #if !TARGET_API_MAC_CARBON  //  {
00564 
00565 /*****************************************************************************/
00566 
00567 pascal  OSErr GetDriverName(short driverRefNum,
00568                             Str255 driverName);
00569 /*  ¶ Get a device driver's name.
00570     The GetDriverName function returns a device driver's name.
00571 
00572     driverRefNum    input:  The driver reference number.
00573     driverName      output: The driver's name.
00574     
00575     Result Codes
00576         noErr               0       No error
00577         badUnitErr          -21     Bad driver reference number
00578 */
00579 
00580 /*****************************************************************************/
00581 
00582 pascal  OSErr   FindDrive(ConstStr255Param pathname,
00583                           short vRefNum,
00584                           DrvQElPtr *driveQElementPtr);
00585 /*  ¶ Find a volume's drive queue element in the drive queue.
00586     The FindDrive function returns a pointer to a mounted volume's
00587     drive queue element.
00588 
00589     pathName            input:  Pointer to a full pathname or nil. If you
00590                                 pass in a partial pathname, it is ignored.
00591                                 A full pathname to a volume must end with
00592                                 a colon character (:).
00593     vRefNum             input:  Volume specification (volume reference
00594                                 number, working directory number, drive
00595                                 number, or 0).
00596     driveQElementPtr    output: Pointer to a volume's drive queue element
00597                                 in the drive queue. DO NOT change the
00598                                 DrvQEl.
00599     
00600     Result Codes
00601         noErr               0       No error
00602         nsvErr              -35     No such volume
00603         paramErr            -50     No default volume
00604         nsDrvErr            -56     No such drive
00605 */
00606 
00607 /*****************************************************************************/
00608 
00609 pascal  OSErr   GetDiskBlocks(ConstStr255Param pathname,
00610                               short vRefNum,
00611                               unsigned long *numBlocks);
00612 /*  ¶ Return the number of physical disk blocks on a disk drive.
00613     The GetDiskBlocks function returns the number of physical disk
00614     blocks on a disk drive. NOTE: This is not the same as volume
00615     allocation blocks!
00616 
00617     pathName    input:  Pointer to a full pathname or nil. If you
00618                         pass in a partial pathname, it is ignored.
00619                         A full pathname to a volume must end with
00620                         a colon character (:).
00621     vRefNum     input:  Volume specification (volume reference
00622                         number, working directory number, drive
00623                         number, or 0).
00624     numBlocks   output: The number of physical disk blocks on the disk drive.
00625     
00626     Result Codes
00627         noErr               0       No error
00628         nsvErr              -35     No such volume
00629         paramErr            -50     No default volume, driver reference
00630                                     number is zero, ReturnFormatList
00631                                     returned zero blocks, DriveStatus
00632                                     returned an unknown value, or
00633                                     driveQElementPtr->qType is unknown
00634         nsDrvErr            -56     No such drive
00635         statusErr           –18     Driver does not respond to this
00636                                     status request
00637         badUnitErr          –21     Driver reference number does not
00638                                     match unit table
00639         unitEmptyErr        –22     Driver reference number specifies
00640                                     a nil handle in unit table
00641         abortErr            –27     Request aborted by KillIO
00642         notOpenErr          –28     Driver not open
00643 */
00644 
00645 /*****************************************************************************/
00646 
00647 pascal  OSErr   GetVolState(ConstStr255Param pathname,
00648                             short vRefNum,
00649                             Boolean *volumeOnline,
00650                             Boolean *volumeEjected,
00651                             Boolean *driveEjectable,
00652                             Boolean *driverWantsEject);
00653 /*  ¶ Returns a volume's online and eject information.
00654     The GetVolState function determines if a volume is online or offline,
00655     if an offline volume is ejected, and if the volume's driver is
00656     ejectable or wants eject calls.
00657     
00658     pathName            input:  Pointer to a full pathname or nil.
00659     vRefNum             input:  Volume specification (volume reference number,
00660                                 working directory number, drive number, or 0).
00661     volumeOnline        output: True if the volume is online;
00662                                 False if the volume is offline.
00663     volumeEjected       output: True if the volume is ejected (ejected
00664                                 volumes are always offline); False if the
00665                                 volume is not ejected.
00666     driveEjectable      output: True if the volume's drive is ejectable;
00667                                 False if the volume's drive is not ejectable.
00668     driverWantsEject    output: True if the volume's driver wants an Eject
00669                                 request after unmount (even if the drive
00670                                 is not ejectable); False if the volume's
00671                                 driver does not need an eject request.
00672     
00673     Result Codes
00674         noErr               0       No error
00675         nsvErr              -35     No such volume
00676         paramErr            -50     No default volume, or pb was NULL
00677 */
00678 
00679     /*****************************************************************************/
00680 
00681 #endif  //  }   !TARGET_API_MAC_CARBON
00682 
00683 /*****************************************************************************/
00684 
00685 pascal  OSErr   GetVolFileSystemID(ConstStr255Param pathname,
00686                                    short vRefNum,
00687                                    short *fileSystemID);
00688 /*  ¶ Get a volume's file system ID.
00689     The GetVolFileSystemID function returned the file system ID of
00690     a mounted volume. The file system ID identifies the file system
00691     that handles requests to a particular volume. Here's a partial list
00692     of file system ID numbers (only Apple's file systems are listed):
00693         FSID    File System
00694         -----   -----------------------------------------------------
00695         $0000   Macintosh HFS or MFS
00696         $0100   ProDOS File System
00697         $0101   PowerTalk Mail Enclosures
00698         $4147   ISO 9660 File Access (through Foreign File Access)
00699         $4242   High Sierra File Access (through Foreign File Access)
00700         $464D   QuickTake File System (through Foreign File Access)
00701         $4953   Macintosh PC Exchange (MS-DOS)
00702         $4A48   Audio CD Access (through Foreign File Access)
00703         $4D4B   Apple Photo Access (through Foreign File Access)
00704     
00705     See the Technical Note "FL 35 - Determining Which File System
00706     Is Active" and the "Guide to the File System Manager" for more
00707     information.
00708     
00709     pathName        input:  Pointer to a full pathname or nil.  If you pass
00710                             in a partial pathname, it is ignored. A full
00711                             pathname to a volume must contain at least
00712                             one colon character (:) and must not start with
00713                             a colon character.
00714     vRefNum         input:  Volume specification (volume reference number,
00715                             working directory number, drive number, or 0).
00716     fileSystemID    output: The volume's file system ID.
00717     
00718     Result Codes
00719         noErr               0       No error
00720         nsvErr              -35     No such volume
00721         paramErr            -50     No default volume, or pb was NULL
00722 */
00723 
00724 /*****************************************************************************/
00725 
00726 pascal  OSErr   UnmountAndEject(ConstStr255Param pathname,
00727                                 short vRefNum);
00728 /*  ¶ Unmount and eject a volume.
00729     The UnmountAndEject function unmounts and ejects a volume. The volume
00730     is ejected only if it is ejectable and not already ejected.
00731     
00732     pathName    input:  Pointer to a full pathname or nil.  If you pass in a 
00733                         partial pathname, it is ignored. A full pathname to a
00734                         volume must end with a colon character (:).
00735     vRefNum     input:  Volume specification (volume reference number, working
00736                         directory number, drive number, or 0).
00737     
00738     Result Codes
00739         noErr               0       No error
00740         nsvErr              -35     No such volume
00741         ioErr               -36     I/O error
00742         bdNamErr            -37     Bad volume name
00743         fBsyErr             -47     One or more files are open
00744         paramErr            -50     No default volume
00745         nsDrvErr            -56     No such drive
00746         extFSErr            -58     External file system error - no file
00747                                     system claimed this call.
00748 */
00749 
00750 /*****************************************************************************/
00751 
00752 pascal  OSErr   OnLine(FSSpecPtr volumes,
00753                        short reqVolCount,
00754                        short *actVolCount,
00755                        short *volIndex);
00756 /*  ¶ Return the list of volumes currently mounted.
00757     The OnLine function returns the list of volumes currently mounted in
00758     an array of FSSpec records.
00759     
00760     A noErr result indicates that the volumes array was filled
00761     (actVolCount == reqVolCount) and there may be additional volumes
00762     mounted. A nsvErr result indicates that the end of the volume list
00763     was found and actVolCount volumes were actually found this time.
00764 
00765     volumes     input:  Pointer to array of FSSpec where the volume list
00766                         is returned.
00767     reqVolCount input:  Maximum number of volumes to return (the number of
00768                         elements in the volumes array).
00769     actVolCount output: The number of volumes actually returned.
00770     volIndex    input:  The current volume index position. Set to 1 to
00771                         start with the first volume.
00772                 output: The volume index position to get the next volume.
00773                         Pass this value the next time you call OnLine to
00774                         start where you left off.
00775     
00776     Result Codes
00777         noErr               0       No error, but there are more volumes
00778                                     to list
00779         nsvErr              -35     No more volumes to be listed
00780         paramErr            -50     volIndex was <= 0
00781 */
00782 
00783 /*****************************************************************************/
00784 
00785 pascal  OSErr SetDefault(short newVRefNum,
00786                          long newDirID,
00787                          short *oldVRefNum,
00788                          long *oldDirID);
00789 /*  ¶ Set the default volume before making Standard I/O requests.
00790     The SetDefault function sets the default volume and directory to the
00791     volume specified by newVRefNum and the directory specified by newDirID.
00792     The current default volume reference number and directory ID are
00793     returned in oldVRefNum and oldDir and must be used to restore the
00794     default volume and directory to their previous state *as soon as
00795     possible* with the RestoreDefault function. These two functions are
00796     designed to be used as a wrapper around Standard I/O routines where
00797     the location of the file is implied to be the default volume and
00798     directory. In other words, this is how you should use these functions:
00799     
00800         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
00801         if ( error == noErr )
00802         {
00803             // call the Stdio functions like remove, rename, tmpfile,
00804             // fopen, freopen, etc. or non-ANSI extensions like
00805             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
00806             
00807             error = RestoreDefault(oldVRefNum, oldDirID);
00808         }
00809     
00810     By using these functions as a wrapper, you won't need to open a working
00811     directory (because SetDefault and RestoreDefault use HSetVol) and you
00812     won't have to worry about the effects of using HSetVol (documented in
00813     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
00814     Inside Macintosh: Files book in the description of the HSetVol and 
00815     PBHSetVol functions) because the default volume/directory is restored
00816     before giving up control to code that might be affected by HSetVol.
00817     
00818     newVRefNum  input:  Volume specification (volume reference number,
00819                         working directory number, drive number, or 0) of
00820                         the new default volume.
00821     newDirID    input:  Directory ID of the new default directory.
00822     oldVRefNum  output: The volume specification to save for use with
00823                         RestoreDefault.
00824     oldDirID    output: The directory ID to save for use with
00825                         RestoreDefault.
00826     
00827     Result Codes
00828         noErr               0       No error
00829         nsvErr              -35     No such volume
00830         bdNamErr            -37     Bad volume name
00831         fnfErr              -43     Directory not found
00832         paramErr            -50     No default volume
00833         afpAccessDenied     -5000   User does not have access to the directory
00834     
00835     __________
00836     
00837     Also see:   RestoreDefault
00838 */
00839 
00840 /*****************************************************************************/
00841 
00842 pascal  OSErr RestoreDefault(short oldVRefNum,
00843                              long oldDirID);
00844 /*  ¶ Restore the default volume after making Standard C I/O requests.
00845     The RestoreDefault function restores the default volume and directory
00846     to the volume specified by oldVRefNum and the directory specified by 
00847     oldDirID. The oldVRefNum and oldDirID parameters were previously
00848     obtained from the SetDefault function. These two functions are designed
00849     to be used as a wrapper around Standard C I/O routines where the
00850     location of the file is implied to be the default volume and directory.
00851     In other words, this is how you should use these functions:
00852     
00853         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
00854         if ( error == noErr )
00855         {
00856             // call the Stdio functions like remove, rename, tmpfile,
00857             // fopen, freopen, etc. or non-ANSI extensions like
00858             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
00859             
00860             error = RestoreDefault(oldVRefNum, oldDirID);
00861         }
00862     
00863     By using these functions as a wrapper, you won't need to open a working
00864     directory (because SetDefault and RestoreDefault use HSetVol) and you
00865     won't have to worry about the effects of using HSetVol (documented in
00866     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
00867     Inside Macintosh: Files book in the description of the HSetVol and 
00868     PBHSetVol functions) because the default volume/directory is restored
00869     before giving up control to code that might be affected by HSetVol.
00870     
00871     oldVRefNum  input: The volume specification to restore.
00872     oldDirID    input:  The directory ID to restore.
00873     
00874     Result Codes
00875         noErr               0       No error
00876         nsvErr              -35     No such volume
00877         bdNamErr            -37     Bad volume name
00878         fnfErr              -43     Directory not found
00879         paramErr            -50     No default volume
00880         rfNumErr            -51     Bad working directory reference number
00881         afpAccessDenied     -5000   User does not have access to the directory
00882     
00883     __________
00884     
00885     Also see:   SetDefault
00886 */
00887 
00888 /*****************************************************************************/
00889 
00890 pascal  OSErr GetDInfo(short vRefNum,
00891                        long dirID,
00892                        ConstStr255Param name,
00893                        DInfo *fndrInfo);
00894 /*  ¶ Get the finder information for a directory.
00895     The GetDInfo function gets the finder information for a directory.
00896 
00897     vRefNum         input:  Volume specification.
00898     dirID           input:  Directory ID.
00899     name            input:  Pointer to object name, or nil when dirID
00900                             specifies a directory that's the object.
00901     fndrInfo        output: If the object is a directory, then its DInfo.
00902     
00903     Result Codes
00904         noErr               0       No error
00905         nsvErr              -35     No such volume
00906         ioErr               -36     I/O error
00907         bdNamErr            -37     Bad filename
00908         fnfErr              -43     File not found
00909         paramErr            -50     No default volume
00910         dirNFErr            -120    Directory not found or incomplete pathname
00911         afpAccessDenied     -5000   User does not have the correct access
00912         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
00913         
00914     __________
00915     
00916     Also see:   FSpGetDInfo, FSpGetFInfoCompat
00917 */
00918 
00919 /*****************************************************************************/
00920 
00921 pascal  OSErr FSpGetDInfo(const FSSpec *spec,
00922                           DInfo *fndrInfo);
00923 /*  ¶ Get the finder information for a directory.
00924     The FSpGetDInfo function gets the finder information for a directory.
00925 
00926     spec        input:  An FSSpec record specifying the directory.
00927     fndrInfo    output: If the object is a directory, then its DInfo.
00928     
00929     Result Codes
00930         noErr               0       No error
00931         nsvErr              -35     No such volume
00932         ioErr               -36     I/O error
00933         bdNamErr            -37     Bad filename
00934         fnfErr              -43     File not found
00935         paramErr            -50     No default volume
00936         dirNFErr            -120    Directory not found or incomplete pathname
00937         afpAccessDenied     -5000   User does not have the correct access
00938         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
00939         
00940     __________
00941     
00942     Also see:   FSpGetFInfoCompat, GetDInfo
00943 */
00944 
00945 /*****************************************************************************/
00946 
00947 pascal  OSErr SetDInfo(short vRefNum,
00948                        long dirID,
00949                        ConstStr255Param name,
00950                        const DInfo *fndrInfo);
00951 /*  ¶ Set the finder information for a directory.
00952     The SetDInfo function sets the finder information for a directory.
00953 
00954     vRefNum         input:  Volume specification.
00955     dirID           input:  Directory ID.
00956     name            input:  Pointer to object name, or nil when dirID
00957                             specifies a directory that's the object.
00958     fndrInfo        input:  The DInfo.
00959     
00960     Result Codes
00961         noErr               0       No error
00962         nsvErr              -35     No such volume
00963         ioErr               -36     I/O error
00964         bdNamErr            -37     Bad filename
00965         fnfErr              -43     File not found
00966         fLckdErr            -45     File is locked
00967         vLckdErr            -46     Volume is locked or read-only
00968         paramErr            -50     No default volume
00969         dirNFErr            -120    Directory not found or incomplete pathname
00970         afpAccessDenied     -5000   User does not have the correct access
00971         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
00972     
00973     __________
00974     
00975     Also see:   FSpSetDInfo, FSpSetFInfoCompat
00976 */
00977 
00978 /*****************************************************************************/
00979 
00980 pascal  OSErr FSpSetDInfo(const FSSpec *spec,
00981                           const DInfo *fndrInfo);
00982 /*  ¶ Set the finder information for a directory.
00983     The FSpSetDInfo function sets the finder information for a directory.
00984 
00985     spec        input:  An FSSpec record specifying the directory.
00986     fndrInfo    input:  The DInfo.
00987     
00988     Result Codes
00989         noErr               0       No error
00990         nsvErr              -35     No such volume
00991         ioErr               -36     I/O error
00992         bdNamErr            -37     Bad filename
00993         fnfErr              -43     File not found
00994         fLckdErr            -45     File is locked
00995         vLckdErr            -46     Volume is locked or read-only
00996         paramErr            -50     No default volume
00997         dirNFErr            -120    Directory not found or incomplete pathname
00998         afpAccessDenied     -5000   User does not have the correct access
00999         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01000     
01001     __________
01002     
01003     Also see:   FSpSetFInfoCompat, SetDInfo
01004 */
01005 
01006 /*****************************************************************************/
01007 
01008 #if OLDROUTINENAMES
01009 #define GetDirID(vRefNum, dirID, name, theDirID, isDirectory)   \
01010         GetDirectoryID(vRefNum, dirID, name, theDirID, isDirectory)
01011 #endif
01012 
01013 pascal  OSErr   GetDirectoryID(short vRefNum,
01014                                long dirID,
01015                                ConstStr255Param name,
01016                                long *theDirID,
01017                                Boolean *isDirectory);
01018 /*  ¶ Get the directory ID number of the directory specified.
01019     The GetDirectoryID function gets the directory ID number of the
01020     directory specified.  If a file is specified, then the parent
01021     directory of the file is returned and isDirectory is false.  If
01022     a directory is specified, then that directory's ID number is
01023     returned and isDirectory is true.
01024     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
01025     mounted volumes can have the same name. For this reason, the use of a
01026     volume name or full pathname to identify a specific volume may not
01027     produce the results you expect.  If more than one volume has the same
01028     name and a volume name or full pathname is used, the File Manager
01029     currently uses the first volume it finds with a matching name in the
01030     volume queue.
01031     
01032     vRefNum         input:  Volume specification.
01033     dirID           input:  Directory ID.
01034     name            input:  Pointer to object name, or nil when dirID
01035                             specifies a directory that's the object.
01036     theDirID        output: If the object is a file, then its parent directory
01037                             ID. If the object is a directory, then its ID.
01038     isDirectory     output: True if object is a directory; false if
01039                             object is a file.
01040     
01041     Result Codes
01042         noErr               0       No error
01043         nsvErr              -35     No such volume
01044         ioErr               -36     I/O error
01045         bdNamErr            -37     Bad filename
01046         fnfErr              -43     File not found
01047         paramErr            -50     No default volume
01048         dirNFErr            -120    Directory not found or incomplete pathname
01049         afpAccessDenied     -5000   User does not have the correct access
01050         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01051 */
01052 
01053 /*****************************************************************************/
01054 
01055 #if OLDROUTINENAMES
01056 #define DirIDFromFSSpec(spec, theDirID, isDirectory)    \
01057         FSpGetDirectoryID(spec, theDirID, isDirectory)
01058 #endif
01059 
01060 pascal  OSErr   FSpGetDirectoryID(const FSSpec *spec,
01061                                   long *theDirID,
01062                                   Boolean *isDirectory);
01063 /*  ¶ Get the directory ID number of a directory.
01064     The FSpGetDirectoryID function gets the directory ID number of the
01065     directory specified by spec. If spec is to a file, then the parent
01066     directory of the file is returned and isDirectory is false.  If
01067     spec is to a directory, then that directory's ID number is
01068     returned and isDirectory is true.
01069     
01070     spec            input:  An FSSpec record specifying the directory.
01071     theDirID        output: The directory ID.
01072     isDirectory     output: True if object is a directory; false if
01073                             object is a file.
01074     
01075     Result Codes
01076         noErr               0       No error
01077         nsvErr              -35     No such volume
01078         ioErr               -36     I/O error
01079         bdNamErr            -37     Bad filename
01080         fnfErr              -43     File not found
01081         paramErr            -50     No default volume
01082         dirNFErr            -120    Directory not found or incomplete pathname
01083         afpAccessDenied     -5000   User does not have the correct access
01084         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01085 */
01086 
01087 /*****************************************************************************/
01088 
01089 pascal  OSErr   GetDirName(short vRefNum,
01090                            long dirID,
01091                            Str31 name);
01092 /*  ¶ Get the name of a directory from its directory ID.
01093     The GetDirName function gets the name of a directory from its
01094     directory ID.
01095 
01096     vRefNum     input:  Volume specification.
01097     dirID       input:  Directory ID.
01098     name        output: Points to a Str31 where the directory name is to be
01099                         returned.
01100     
01101     Result Codes
01102         noErr               0       No error
01103         nsvErr              -35     No such volume
01104         ioErr               -36     I/O error
01105         bdNamErr            -37     Bad filename
01106         fnfErr              -43     File not found
01107         paramErr            -50     No default volume or
01108                                     name parameter was NULL
01109         dirNFErr            -120    Directory not found or incomplete pathname
01110         afpAccessDenied     -5000   User does not have the correct access
01111         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01112 */
01113 
01114 /*****************************************************************************/
01115 
01116 pascal  OSErr   GetIOACUser(short vRefNum,
01117                             long dirID,
01118                             ConstStr255Param name,
01119                             SInt8 *ioACUser);
01120 /*  ¶ Get a directory's access restrictions byte.
01121     GetIOACUser returns a directory's access restrictions byte.
01122     Use the masks and macro defined in MoreFilesExtras to check for
01123     specific access priviledges.
01124     
01125     vRefNum     input:  Volume specification.
01126     dirID       input:  Directory ID.
01127     name        input:  Pointer to object name, or nil when dirID
01128                         specifies a directory that's the object.
01129     ioACUser    output: The access restriction byte
01130     
01131     Result Codes
01132         noErr               0       No error
01133         nsvErr              -35     No such volume
01134         ioErr               -36     I/O error
01135         bdNamErr            -37     Bad filename
01136         fnfErr              -43     File not found
01137         paramErr            -50     No default volume
01138         dirNFErr            -120    Directory not found or incomplete pathname
01139         afpAccessDenied     -5000   User does not have the correct access
01140         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01141 */
01142 
01143 /*****************************************************************************/
01144 
01145 pascal  OSErr   FSpGetIOACUser(const FSSpec *spec,
01146                                SInt8 *ioACUser);
01147 /*  ¶ Get a directory's access restrictions byte.
01148     FSpGetIOACUser returns a directory's access restrictions byte.
01149     Use the masks and macro defined in MoreFilesExtras to check for
01150     specific access priviledges.
01151     
01152     spec        input:  An FSSpec record specifying the directory.
01153     ioACUser    output: The access restriction byte
01154     
01155     Result Codes
01156         noErr               0       No error
01157         nsvErr              -35     No such volume
01158         ioErr               -36     I/O error
01159         bdNamErr            -37     Bad filename
01160         fnfErr              -43     File not found
01161         paramErr            -50     No default volume
01162         dirNFErr            -120    Directory not found or incomplete pathname
01163         afpAccessDenied     -5000   User does not have the correct access
01164         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01165 */
01166 
01167 /*****************************************************************************/
01168 
01169 pascal  OSErr   GetParentID(short vRefNum,
01170                             long dirID,
01171                             ConstStr255Param name,
01172                             long *parID);
01173 /*  ¶ Get the parent directory ID number of the specified object.
01174     The GetParentID function gets the parent directory ID number of the
01175     specified object.
01176     
01177     vRefNum     input:  Volume specification.
01178     dirID       input:  Directory ID.
01179     name        input:  Pointer to object name, or nil when dirID specifies
01180                         a directory that's the object.
01181     parID       output: The parent directory ID of the specified object.
01182     
01183     Result Codes
01184         noErr               0       No error
01185         nsvErr              -35     No such volume
01186         ioErr               -36     I/O error
01187         bdNamErr            -37     Bad filename
01188         fnfErr              -43     File not found
01189         paramErr            -50     No default volume
01190         dirNFErr            -120    Directory not found or incomplete pathname
01191         afpAccessDenied     -5000   User does not have the correct access
01192         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01193 */
01194 
01195 /*****************************************************************************/
01196 
01197 pascal  OSErr   GetFilenameFromPathname(ConstStr255Param pathname,
01198                                         Str255 filename);
01199 /*  ¶ Get the object name from the end of a full or partial pathname.
01200     The GetFilenameFromPathname function gets the file (or directory) name
01201     from the end of a full or partial pathname. Returns notAFileErr if the
01202     pathname is nil, the pathname is empty, or the pathname cannot refer to
01203     a filename (with a noErr result, the pathname could still refer to a
01204     directory).
01205     
01206     pathname    input:  A full or partial pathname.
01207     filename    output: The file (or directory) name.
01208     
01209     Result Codes
01210         noErr               0       No error
01211         notAFileErr         -1302   The pathname is nil, the pathname
01212                                     is empty, or the pathname cannot refer
01213                                     to a filename
01214     
01215     __________
01216     
01217     See also:   GetObjectLocation.
01218 */
01219 
01220 /*****************************************************************************/
01221 
01222 pascal  OSErr   GetObjectLocation(short vRefNum,
01223                                   long dirID,
01224                                   ConstStr255Param pathname,
01225                                   short *realVRefNum,
01226                                   long *realParID,
01227                                   Str255 realName,
01228                                   Boolean *isDirectory);
01229 /*  ¶ Get a file system object's location.
01230     The GetObjectLocation function gets a file system object's location -
01231     that is, its real volume reference number, real parent directory ID,
01232     and name. While we're at it, determine if the object is a file or directory.
01233     If GetObjectLocation returns fnfErr, then the location information
01234     returned is valid, but it describes an object that doesn't exist.
01235     You can use the location information for another operation, such as
01236     creating a file or directory.
01237     
01238     vRefNum     input:  Volume specification.
01239     dirID       input:  Directory ID.
01240     pathname    input:  Pointer to object name, or nil when dirID specifies
01241                         a directory that's the object.
01242     realVRefNum output: The real volume reference number.
01243     realParID   output: The parent directory ID of the specified object.
01244     realName    output: The name of the specified object (the case of the
01245                         object name may not be the same as the object's
01246                         catalog entry on disk - since the Macintosh file
01247                         system is not case sensitive, it shouldn't matter).
01248     isDirectory output: True if object is a directory; false if object
01249                         is a file.
01250     
01251     Result Codes
01252         noErr               0       No error
01253         nsvErr              -35     No such volume
01254         ioErr               -36     I/O error
01255         bdNamErr            -37     Bad filename
01256         fnfErr              -43     File not found
01257         paramErr            -50     No default volume
01258         dirNFErr            -120    Directory not found or incomplete pathname
01259         notAFileErr         -1302   The pathname is nil, the pathname
01260                                     is empty, or the pathname cannot refer
01261                                     to a filename
01262         afpAccessDenied     -5000   User does not have the correct access
01263         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01264     
01265     __________
01266     
01267     See also:   FSMakeFSSpecCompat
01268 */
01269 
01270 /*****************************************************************************/
01271 
01272 pascal  OSErr   GetDirItems(short vRefNum,
01273                             long dirID,
01274                             ConstStr255Param name,
01275                             Boolean getFiles,
01276                             Boolean getDirectories,
01277                             FSSpecPtr items,
01278                             short reqItemCount,
01279                             short *actItemCount,
01280                             short *itemIndex);
01281 /*  ¶ Return a list of items in a directory.
01282     The GetDirItems function returns a list of items in the specified
01283     directory in an array of FSSpec records. File, subdirectories, or
01284     both can be returned in the list.
01285     
01286     A noErr result indicates that the items array was filled
01287     (actItemCount == reqItemCount) and there may be additional items
01288     left in the directory. A fnfErr result indicates that the end of
01289     the directory list was found and actItemCount items were actually
01290     found this time.
01291 
01292     vRefNum         input:  Volume specification.
01293     dirID           input:  Directory ID.
01294     name            input:  Pointer to object name, or nil when dirID
01295                             specifies a directory that's the object.
01296     getFiles        input:  Pass true to have files added to the items list.
01297     getDirectories  input:  Pass true to have directories added to the
01298                             items list.
01299     items           input:  Pointer to array of FSSpec where the item list
01300                             is returned.
01301     reqItemCount    input:  Maximum number of items to return (the number
01302                             of elements in the items array).
01303     actItemCount    output: The number of items actually returned.
01304     itemIndex       input:  The current item index position. Set to 1 to
01305                             start with the first item in the directory.
01306                     output: The item index position to get the next item.
01307                             Pass this value the next time you call
01308                             GetDirItems to start where you left off.
01309     
01310     Result Codes
01311         noErr               0       No error, but there are more items
01312                                     to list
01313         nsvErr              -35     No such volume
01314         ioErr               -36     I/O error
01315         bdNamErr            -37     Bad filename
01316         fnfErr              -43     File not found, there are no more items
01317                                     to be listed.
01318         paramErr            -50     No default volume or itemIndex was <= 0
01319         dirNFErr            -120    Directory not found or incomplete pathname
01320         afpAccessDenied     -5000   User does not have the correct access
01321         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01322 */
01323 
01324 /*****************************************************************************/
01325 
01326 pascal  OSErr   DeleteDirectoryContents(short vRefNum,
01327                                         long dirID,
01328                                         ConstStr255Param name);
01329 /*  ¶ Delete the contents of a directory.
01330     The DeleteDirectoryContents function deletes the contents of a directory.
01331     All files and subdirectories in the specified directory are deleted.
01332     If a locked file or directory is encountered, it is unlocked and then
01333     deleted.  If any unexpected errors are encountered,
01334     DeleteDirectoryContents quits and returns to the caller.
01335     
01336     vRefNum input:  Volume specification.
01337     dirID   input:  Directory ID.
01338     name    input:  Pointer to directory name, or nil when dirID specifies
01339                     a directory that's the object.
01340     
01341     Result Codes
01342         noErr               0       No error
01343         nsvErr              -35     No such volume
01344         ioErr               -36     I/O error
01345         bdNamErr            -37     Bad filename
01346         fnfErr              -43     File not found
01347         wPrErr              -44     Hardware volume lock    
01348         fLckdErr            -45     File is locked  
01349         vLckdErr            -46     Software volume lock    
01350         fBsyErr             -47     File busy, directory not empty, or working directory control block open 
01351         paramErr            -50     No default volume
01352         dirNFErr            -120    Directory not found or incomplete pathname
01353         afpAccessDenied     -5000   User does not have the correct access
01354         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01355     
01356     __________
01357     
01358     Also see:   DeleteDirectory
01359 */
01360 
01361 /*****************************************************************************/
01362 
01363 pascal  OSErr   DeleteDirectory(short vRefNum,
01364                                 long dirID,
01365                                 ConstStr255Param name);
01366 /*  ¶ Delete a directory and its contents.
01367     The DeleteDirectory function deletes a directory and its contents.
01368     All files and subdirectories in the specified directory are deleted.
01369     If a locked file or directory is encountered, it is unlocked and then
01370     deleted.  After deleting the directories contents, the directory is
01371     deleted. If any unexpected errors are encountered, DeleteDirectory
01372     quits and returns to the caller.
01373     
01374     vRefNum input:  Volume specification.
01375     dirID   input:  Directory ID.
01376     name    input:  Pointer to directory name, or nil when dirID specifies
01377                     a directory that's the object.
01378     
01379     Result Codes
01380         noErr               0       No error
01381         nsvErr              -35     No such volume
01382         ioErr               -36     I/O error
01383         bdNamErr            -37     Bad filename
01384         fnfErr              -43     File not found
01385         wPrErr              -44     Hardware volume lock
01386         fLckdErr            -45     File is locked
01387         vLckdErr            -46     Software volume lock
01388         fBsyErr             -47     File busy, directory not empty, or working directory control block open 
01389         paramErr            -50     No default volume
01390         dirNFErr            -120    Directory not found or incomplete pathname
01391         afpAccessDenied     -5000   User does not have the correct access
01392         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01393     
01394     __________
01395     
01396     Also see:   DeleteDirectoryContents
01397 */
01398 
01399 /*****************************************************************************/
01400 
01401 pascal  OSErr   CheckObjectLock(short vRefNum,
01402                                 long dirID,
01403                                 ConstStr255Param name);
01404 /*  ¶ Determine if a file or directory is locked.
01405     The CheckObjectLock function determines if a file or directory is locked.
01406     If CheckObjectLock returns noErr, then the file or directory
01407     is not locked. If CheckObjectLock returns fLckdErr, the it is locked.
01408     
01409     vRefNum input:  Volume specification.
01410     dirID   input:  Directory ID.
01411     name    input:  Pointer to object name, or nil when dirID specifies
01412                     a directory that's the object.
01413     
01414     Result Codes
01415         noErr               0       No error
01416         nsvErr              -35     No such volume
01417         ioErr               -36     I/O error
01418         bdNamErr            -37     Bad filename
01419         fnfErr              -43     File not found
01420         fLckdErr            -45     File is locked
01421         paramErr            -50     No default volume
01422         dirNFErr            -120    Directory not found or incomplete pathname
01423         afpAccessDenied     -5000   User does not have the correct access
01424         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01425     
01426     __________
01427     
01428     Also see:   FSpCheckObjectLock
01429 */
01430 
01431 /*****************************************************************************/
01432 
01433 pascal  OSErr   FSpCheckObjectLock(const FSSpec *spec);
01434 /*  ¶ Determine if a file or directory is locked.
01435     The FSpCheckObjectLock function determines if a file or directory is locked.
01436     If FSpCheckObjectLock returns noErr, then the file or directory
01437     is not locked.
01438     
01439     spec    input:  An FSSpec record specifying the object.
01440     
01441     Result Codes
01442         noErr               0       No error
01443         nsvErr              -35     No such volume
01444         ioErr               -36     I/O error
01445         bdNamErr            -37     Bad filename
01446         fnfErr              -43     File not found
01447         fLckdErr            -45     File is locked
01448         paramErr            -50     No default volume
01449         dirNFErr            -120    Directory not found or incomplete pathname
01450         afpAccessDenied     -5000   User does not have the correct access
01451         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01452     
01453     __________
01454     
01455     Also see:   CheckObjectLock
01456 */
01457 
01458 /*****************************************************************************/
01459 
01460 pascal  OSErr   GetFileSize(short vRefNum,
01461                             long dirID,
01462                             ConstStr255Param fileName,
01463                             long *dataSize,
01464                             long *rsrcSize);
01465 /*  ¶ Get the logical sizes of a file's forks.
01466     The GetFileSize function returns the logical size of a file's
01467     data and resource fork.
01468     
01469     vRefNum     input:  Volume specification.
01470     dirID       input:  Directory ID.
01471     name        input:  The name of the file.
01472     dataSize    output: The number of bytes in the file's data fork.
01473     rsrcSize    output: The number of bytes in the file's resource fork.
01474     
01475     Result Codes
01476         noErr               0       No error
01477         nsvErr              -35     No such volume
01478         ioErr               -36     I/O error
01479         bdNamErr            -37     Bad filename
01480         fnfErr              -43     File not found
01481         paramErr            -50     No default volume
01482         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
01483         afpAccessDenied     -5000   User does not have the correct access
01484         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01485     
01486     __________
01487     
01488     See also:   FSpGetFileSize
01489 */
01490 
01491 /*****************************************************************************/
01492 
01493 pascal  OSErr   FSpGetFileSize(const FSSpec *spec,
01494                                long *dataSize,
01495                                long *rsrcSize);
01496 /*  ¶ Get the logical sizes of a file's forks.
01497     The FSpGetFileSize function returns the logical size of a file's
01498     data and resource fork.
01499     
01500     spec        input:  An FSSpec record specifying the file.
01501     dataSize    output: The number of bytes in the file's data fork.
01502     rsrcSize    output: The number of bytes in the file's resource fork.
01503     
01504     Result Codes
01505         noErr               0       No error
01506         nsvErr              -35     No such volume
01507         ioErr               -36     I/O error
01508         bdNamErr            -37     Bad filename
01509         fnfErr              -43     File not found
01510         paramErr            -50     No default volume
01511         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
01512         afpAccessDenied     -5000   User does not have the correct access
01513         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01514     
01515     __________
01516     
01517     See also:   GetFileSize
01518 */
01519 
01520 /*****************************************************************************/
01521 
01522 pascal  OSErr   BumpDate(short vRefNum,
01523                          long dirID,
01524                          ConstStr255Param name);
01525 /*  ¶ Update the modification date of a file or directory.
01526     The BumpDate function changes the modification date of a file or
01527     directory to the current date/time.  If the modification date is already
01528     equal to the current date/time, then add one second to the
01529     modification date.
01530     
01531     vRefNum input:  Volume specification.
01532     dirID   input:  Directory ID.
01533     name    input:  Pointer to object name, or nil when dirID specifies
01534                     a directory that's the object.
01535     
01536     Result Codes
01537         noErr               0       No error
01538         nsvErr              -35     No such volume
01539         ioErr               -36     I/O error
01540         bdNamErr            -37     Bad filename
01541         fnfErr              -43     File not found
01542         fLckdErr            -45     File is locked
01543         vLckdErr            -46     Volume is locked or read-only
01544         paramErr            -50     No default volume
01545         dirNFErr            -120    Directory not found or incomplete pathname
01546         afpAccessDenied     -5000   User does not have the correct access
01547         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01548     
01549     __________
01550     
01551     See also:   FSpBumpDate
01552 */
01553 
01554 /*****************************************************************************/
01555 
01556 pascal  OSErr   FSpBumpDate(const FSSpec *spec);
01557 /*  ¶ Update the modification date of a file or directory.
01558     The FSpBumpDate function changes the modification date of a file or
01559     directory to the current date/time.  If the modification date is already
01560     equal to the current date/time, then add one second to the
01561     modification date.
01562     
01563     spec    input:  An FSSpec record specifying the object.
01564     
01565     Result Codes
01566         noErr               0       No error
01567         nsvErr              -35     No such volume
01568         ioErr               -36     I/O error
01569         bdNamErr            -37     Bad filename
01570         fnfErr              -43     File not found
01571         fLckdErr            -45     File is locked
01572         vLckdErr            -46     Volume is locked or read-only
01573         paramErr            -50     No default volume
01574         dirNFErr            -120    Directory not found or incomplete pathname
01575         afpAccessDenied     -5000   User does not have the correct access
01576         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01577     
01578     __________
01579     
01580     See also:   BumpDate
01581 */
01582 
01583 /*****************************************************************************/
01584 
01585 pascal  OSErr   ChangeCreatorType(short vRefNum,
01586                                   long dirID,
01587                                   ConstStr255Param name,
01588                                   OSType creator,
01589                                   OSType fileType);
01590 /*  ¶ Change the creator or file type of a file.
01591     The ChangeCreatorType function changes the creator or file type of a file.
01592 
01593     vRefNum     input:  Volume specification.
01594     dirID       input:  Directory ID.
01595     name        input:  The name of the file.
01596     creator     input:  The new creator type or 0x00000000 to leave
01597                         the creator type alone.
01598     fileType    input:  The new file type or 0x00000000 to leave the
01599                         file type alone.
01600     
01601     Result Codes
01602         noErr               0       No error
01603         nsvErr              -35     No such volume
01604         ioErr               -36     I/O error
01605         bdNamErr            -37     Bad filename
01606         fnfErr              -43     File not found
01607         fLckdErr            -45     File is locked
01608         vLckdErr            -46     Volume is locked or read-only
01609         paramErr            -50     No default volume
01610         dirNFErr            -120    Directory not found or incomplete pathname
01611         notAFileErr         -1302   Name was not a file
01612         afpAccessDenied     -5000   User does not have the correct access
01613         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01614     
01615     __________
01616     
01617     See also:   FSpChangeCreatorType
01618 */
01619 
01620 /*****************************************************************************/
01621 
01622 pascal  OSErr   FSpChangeCreatorType(const FSSpec *spec,
01623                                      OSType creator,
01624                                      OSType fileType);
01625 /*  ¶ Change the creator or file type of a file.
01626     The FSpChangeCreatorType function changes the creator or file type of a file.
01627 
01628     spec        input:  An FSSpec record specifying the file.
01629     creator     input:  The new creator type or 0x00000000 to leave
01630                         the creator type alone.
01631     fileType    input:  The new file type or 0x00000000 to leave the
01632                         file type alone.
01633     
01634     Result Codes
01635         noErr               0       No error
01636         nsvErr              -35     No such volume
01637         ioErr               -36     I/O error
01638         bdNamErr            -37     Bad filename
01639         fnfErr              -43     File not found
01640         fLckdErr            -45     File is locked
01641         vLckdErr            -46     Volume is locked or read-only
01642         paramErr            -50     No default volume
01643         dirNFErr            -120    Directory not found or incomplete pathname
01644         notAFileErr         -1302   Name was not a file
01645         afpAccessDenied     -5000   User does not have the correct access
01646         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01647     
01648     __________
01649     
01650     See also:   ChangeCreatorType
01651 */
01652 
01653 /*****************************************************************************/
01654 
01655 pascal  OSErr   ChangeFDFlags(short vRefNum,
01656                               long dirID,
01657                               ConstStr255Param name,
01658                               Boolean   setBits,
01659                               unsigned short flagBits);
01660 /*  ¶ Set or clear Finder Flag bits.
01661     The ChangeFDFlags function sets or clears Finder Flag bits in the
01662     fdFlags field of a file or directory's FInfo record.
01663     
01664     vRefNum     input:  Volume specification.
01665     dirID       input:  Directory ID.
01666     name        input:  Pointer to object name, or nil when dirID specifies
01667                         a directory that's the object.
01668     setBits     input:  If true, then set the bits specified in flagBits.
01669                         If false, then clear the bits specified in flagBits.
01670     flagBits    input:  The flagBits parameter specifies which Finder Flag
01671                         bits to set or clear. If a bit in flagBits is set,
01672                         then the same bit in fdFlags is either set or
01673                         cleared depending on the state of the setBits
01674                         parameter.
01675     
01676     Result Codes
01677         noErr               0       No error
01678         nsvErr              -35     No such volume
01679         ioErr               -36     I/O error
01680         bdNamErr            -37     Bad filename
01681         fnfErr              -43     File not found
01682         fLckdErr            -45     File is locked
01683         vLckdErr            -46     Volume is locked or read-only
01684         paramErr            -50     No default volume
01685         dirNFErr            -120    Directory not found or incomplete pathname
01686         afpAccessDenied     -5000   User does not have the correct access
01687         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01688     
01689     __________
01690     
01691     See also:   FSpChangeFDFlags
01692 */
01693 
01694 /*****************************************************************************/
01695 
01696 pascal  OSErr   FSpChangeFDFlags(const FSSpec *spec,
01697                                  Boolean setBits,
01698                                  unsigned short flagBits);
01699 /*  ¶ Set or clear Finder Flag bits.
01700     The FSpChangeFDFlags function sets or clears Finder Flag bits in the
01701     fdFlags field of a file or directory's FInfo record.
01702     
01703     spec        input:  An FSSpec record specifying the object.
01704     setBits     input:  If true, then set the bits specified in flagBits.
01705                         If false, then clear the bits specified in flagBits.
01706     flagBits    input:  The flagBits parameter specifies which Finder Flag
01707                         bits to set or clear. If a bit in flagBits is set,
01708                         then the same bit in fdFlags is either set or
01709                         cleared depending on the state of the setBits
01710                         parameter.
01711     
01712     Result Codes
01713         noErr               0       No error
01714         nsvErr              -35     No such volume
01715         ioErr               -36     I/O error
01716         bdNamErr            -37     Bad filename
01717         fnfErr              -43     File not found
01718         fLckdErr            -45     File is locked
01719         vLckdErr            -46     Volume is locked or read-only
01720         paramErr            -50     No default volume
01721         dirNFErr            -120    Directory not found or incomplete pathname
01722         afpAccessDenied     -5000   User does not have the correct access
01723         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01724     
01725     __________
01726     
01727     See also:   ChangeFDFlags
01728 */
01729 
01730 /*****************************************************************************/
01731 
01732 pascal  OSErr   SetIsInvisible(short vRefNum,
01733                                long dirID,
01734                                ConstStr255Param name);
01735 /*  ¶ Set the invisible Finder Flag bit.
01736     The SetIsInvisible function sets the invisible bit in the fdFlags
01737     word of the specified file or directory's finder information.
01738     
01739     vRefNum input:  Volume specification.
01740     dirID   input:  Directory ID.
01741     name    input:  Pointer to object name, or nil when dirID specifies
01742                     a directory that's the object.
01743     
01744     Result Codes
01745         noErr               0       No error
01746         nsvErr              -35     No such volume
01747         ioErr               -36     I/O error
01748         bdNamErr            -37     Bad filename
01749         fnfErr              -43     File not found
01750         fLckdErr            -45     File is locked
01751         vLckdErr            -46     Volume is locked or read-only
01752         paramErr            -50     No default volume
01753         dirNFErr            -120    Directory not found or incomplete pathname
01754         afpAccessDenied     -5000   User does not have the correct access
01755         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01756     
01757     __________
01758     
01759     See also:   FSpSetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
01760 */
01761 
01762 /*****************************************************************************/
01763 
01764 pascal  OSErr   FSpSetIsInvisible(const FSSpec *spec);
01765 /*  ¶ Set the invisible Finder Flag bit.
01766     The FSpSetIsInvisible function sets the invisible bit in the fdFlags
01767     word of the specified file or directory's finder information.
01768     
01769     spec    input:  An FSSpec record specifying the object.
01770     
01771     Result Codes
01772         noErr               0       No error
01773         nsvErr              -35     No such volume
01774         ioErr               -36     I/O error
01775         bdNamErr            -37     Bad filename
01776         fnfErr              -43     File not found
01777         fLckdErr            -45     File is locked
01778         vLckdErr            -46     Volume is locked or read-only
01779         paramErr            -50     No default volume
01780         dirNFErr            -120    Directory not found or incomplete pathname
01781         afpAccessDenied     -5000   User does not have the correct access
01782         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01783     
01784     __________
01785     
01786     See also:   SetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
01787 */
01788 
01789 /*****************************************************************************/
01790 
01791 pascal  OSErr   ClearIsInvisible(short vRefNum,
01792                                  long dirID,
01793                                  ConstStr255Param name);
01794 /*  ¶ Clear the invisible Finder Flag bit.
01795     The ClearIsInvisible function clears the invisible bit in the fdFlags
01796     word of the specified file or directory's finder information.
01797     
01798     vRefNum input:  Volume specification.
01799     dirID   input:  Directory ID.
01800     name    input:  Pointer to object name, or nil when dirID specifies
01801                     a directory that's the object.
01802     
01803     Result Codes
01804         noErr               0       No error
01805         nsvErr              -35     No such volume
01806         ioErr               -36     I/O error
01807         bdNamErr            -37     Bad filename
01808         fnfErr              -43     File not found
01809         fLckdErr            -45     File is locked
01810         vLckdErr            -46     Volume is locked or read-only
01811         paramErr            -50     No default volume
01812         dirNFErr            -120    Directory not found or incomplete pathname
01813         afpAccessDenied     -5000   User does not have the correct access
01814         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01815     
01816     __________
01817     
01818     See also:   SetIsInvisible, FSpSetIsInvisible, FSpClearIsInvisible
01819 */
01820 
01821 /*****************************************************************************/
01822 
01823 pascal  OSErr   FSpClearIsInvisible(const FSSpec *spec);
01824 /*  ¶ Clear the invisible Finder Flag bit.
01825     The FSpClearIsInvisible function clears the invisible bit in the fdFlags
01826     word of the specified file or directory's finder information.
01827     
01828     spec    input:  An FSSpec record specifying the object.
01829     
01830     Result Codes
01831         noErr               0       No error
01832         nsvErr              -35     No such volume
01833         ioErr               -36     I/O error
01834         bdNamErr            -37     Bad filename
01835         fnfErr              -43     File not found
01836         fLckdErr            -45     File is locked
01837         vLckdErr            -46     Volume is locked or read-only
01838         paramErr            -50     No default volume
01839         dirNFErr            -120    Directory not found or incomplete pathname
01840         afpAccessDenied     -5000   User does not have the correct access
01841         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01842     
01843     __________
01844     
01845     See also:   SetIsInvisible, FSpSetIsInvisible, ClearIsInvisible
01846 */
01847 
01848 /*****************************************************************************/
01849 
01850 pascal  OSErr   SetNameLocked(short vRefNum,
01851                               long dirID,
01852                               ConstStr255Param name);
01853 /*  ¶ Set the nameLocked Finder Flag bit.
01854     The SetNameLocked function sets the nameLocked bit in the fdFlags word
01855     of the specified file or directory's finder information.
01856     
01857     vRefNum input:  Volume specification.
01858     dirID   input:  Directory ID.
01859     name    input:  Pointer to object name, or nil when dirID specifies
01860                     a directory that's the object.
01861     
01862     Result Codes
01863         noErr               0       No error
01864         nsvErr              -35     No such volume
01865         ioErr               -36     I/O error
01866         bdNamErr            -37     Bad filename
01867         fnfErr              -43     File not found
01868         fLckdErr            -45     File is locked
01869         vLckdErr            -46     Volume is locked or read-only
01870         paramErr            -50     No default volume
01871         dirNFErr            -120    Directory not found or incomplete pathname
01872         afpAccessDenied     -5000   User does not have the correct access
01873         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01874     
01875     __________
01876     
01877     See also:   FSpSetNameLocked, ClearNameLocked, FSpClearNameLocked
01878 */
01879 
01880 /*****************************************************************************/
01881 
01882 pascal  OSErr   FSpSetNameLocked(const FSSpec *spec);
01883 /*  ¶ Set the nameLocked Finder Flag bit.
01884     The FSpSetNameLocked function sets the nameLocked bit in the fdFlags word
01885     of the specified file or directory's finder information.
01886     
01887     spec    input:  An FSSpec record specifying the object.
01888     
01889     Result Codes
01890         noErr               0       No error
01891         nsvErr              -35     No such volume
01892         ioErr               -36     I/O error
01893         bdNamErr            -37     Bad filename
01894         fnfErr              -43     File not found
01895         fLckdErr            -45     File is locked
01896         vLckdErr            -46     Volume is locked or read-only
01897         paramErr            -50     No default volume
01898         dirNFErr            -120    Directory not found or incomplete pathname
01899         afpAccessDenied     -5000   User does not have the correct access
01900         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01901     
01902     __________
01903     
01904     See also:   SetNameLocked, ClearNameLocked, FSpClearNameLocked
01905 */
01906 
01907 /*****************************************************************************/
01908 
01909 pascal  OSErr   ClearNameLocked(short vRefNum,
01910                                 long dirID,
01911                                 ConstStr255Param name);
01912 /*  ¶ Clear the nameLocked Finder Flag bit.
01913     The ClearNameLocked function clears the nameLocked bit in the fdFlags
01914     word of the specified file or directory's finder information.
01915     
01916     vRefNum input:  Volume specification.
01917     dirID   input:  Directory ID.
01918     name    input:  Pointer to object name, or nil when dirID specifies
01919                     a directory that's the object.
01920     
01921     Result Codes
01922         noErr               0       No error
01923         nsvErr              -35     No such volume
01924         ioErr               -36     I/O error
01925         bdNamErr            -37     Bad filename
01926         fnfErr              -43     File not found
01927         fLckdErr            -45     File is locked
01928         vLckdErr            -46     Volume is locked or read-only
01929         paramErr            -50     No default volume
01930         dirNFErr            -120    Directory not found or incomplete pathname
01931         afpAccessDenied     -5000   User does not have the correct access
01932         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01933     
01934     __________
01935     
01936     See also:   SetNameLocked, FSpSetNameLocked, FSpClearNameLocked
01937 */
01938 
01939 /*****************************************************************************/
01940 
01941 pascal  OSErr   FSpClearNameLocked(const FSSpec *spec);
01942 /*  ¶ Clear the nameLocked Finder Flag bit.
01943     The FSpClearNameLocked function clears the nameLocked bit in the fdFlags
01944     word of the specified file or directory's finder information.
01945     
01946     spec    input:  An FSSpec record specifying the object.
01947     
01948     Result Codes
01949         noErr               0       No error
01950         nsvErr              -35     No such volume
01951         ioErr               -36     I/O error
01952         bdNamErr            -37     Bad filename
01953         fnfErr              -43     File not found
01954         fLckdErr            -45     File is locked
01955         vLckdErr            -46     Volume is locked or read-only
01956         paramErr            -50     No default volume
01957         dirNFErr            -120    Directory not found or incomplete pathname
01958         afpAccessDenied     -5000   User does not have the correct access
01959         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01960     
01961     __________
01962     
01963     See also:   SetNameLocked, FSpSetNameLocked, ClearNameLocked
01964 */
01965 
01966 /*****************************************************************************/
01967 
01968 pascal  OSErr   SetIsStationery(short vRefNum,
01969                                 long dirID,
01970                                 ConstStr255Param name);
01971 /*  ¶ Set the isStationery Finder Flag bit.
01972     The SetIsStationery function sets the isStationery bit in the
01973     fdFlags word of the specified file or directory's finder information.
01974     
01975     vRefNum input:  Volume specification.
01976     dirID   input:  Directory ID.
01977     name    input:  Pointer to object name, or nil when dirID specifies
01978                     a directory that's the object.
01979     
01980     Result Codes
01981         noErr               0       No error
01982         nsvErr              -35     No such volume
01983         ioErr               -36     I/O error
01984         bdNamErr            -37     Bad filename
01985         fnfErr              -43     File not found
01986         fLckdErr            -45     File is locked
01987         vLckdErr            -46     Volume is locked or read-only
01988         paramErr            -50     No default volume
01989         dirNFErr            -120    Directory not found or incomplete pathname
01990         afpAccessDenied     -5000   User does not have the correct access
01991         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
01992     
01993     __________
01994     
01995     See also:   FSpSetIsStationery, ClearIsStationery, FSpClearIsStationery
01996 */
01997 
01998 /*****************************************************************************/
01999 
02000 pascal  OSErr   FSpSetIsStationery(const FSSpec *spec);
02001 /*  ¶ Set the isStationery Finder Flag bit.
02002     The FSpSetIsStationery function sets the isStationery bit in the
02003     fdFlags word of the specified file or directory's finder information.
02004     
02005     spec    input:  An FSSpec record specifying the object.
02006     
02007     Result Codes
02008         noErr               0       No error
02009         nsvErr              -35     No such volume
02010         ioErr               -36     I/O error
02011         bdNamErr            -37     Bad filename
02012         fnfErr              -43     File not found
02013         fLckdErr            -45     File is locked
02014         vLckdErr            -46     Volume is locked or read-only
02015         paramErr            -50     No default volume
02016         dirNFErr            -120    Directory not found or incomplete pathname
02017         afpAccessDenied     -5000   User does not have the correct access
02018         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02019     
02020     __________
02021     
02022     See also:   SetIsStationery, ClearIsStationery, FSpClearIsStationery
02023 */
02024 
02025 /*****************************************************************************/
02026 
02027 pascal  OSErr   ClearIsStationery(short vRefNum,
02028                                   long dirID,
02029                                   ConstStr255Param name);
02030 /*  ¶ Clear the isStationery Finder Flag bit.
02031     The ClearIsStationery function clears the isStationery bit in the
02032     fdFlags word of the specified file or directory's finder information.
02033     
02034     vRefNum input:  Volume specification.
02035     dirID   input:  Directory ID.
02036     name    input:  Pointer to object name, or nil when dirID specifies
02037                     a directory that's the object.
02038     
02039     Result Codes
02040         noErr               0       No error
02041         nsvErr              -35     No such volume
02042         ioErr               -36     I/O error
02043         bdNamErr            -37     Bad filename
02044         fnfErr              -43     File not found
02045         fLckdErr            -45     File is locked
02046         vLckdErr            -46     Volume is locked or read-only
02047         paramErr            -50     No default volume
02048         dirNFErr            -120    Directory not found or incomplete pathname
02049         afpAccessDenied     -5000   User does not have the correct access
02050         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02051     
02052     __________
02053     
02054     See also:   SetIsStationery, FSpSetIsStationery, FSpClearIsStationery
02055 */
02056 
02057 /*****************************************************************************/
02058 
02059 pascal  OSErr   FSpClearIsStationery(const FSSpec *spec);
02060 /*  ¶ Clear the isStationery Finder Flag bit.
02061     The FSpClearIsStationery function clears the isStationery bit in the
02062     fdFlags word of the specified file or directory's finder information.
02063     
02064     spec    input:  An FSSpec record specifying the object.
02065     
02066     Result Codes
02067         noErr               0       No error
02068         nsvErr              -35     No such volume
02069         ioErr               -36     I/O error
02070         bdNamErr            -37     Bad filename
02071         fnfErr              -43     File not found
02072         fLckdErr            -45     File is locked
02073         vLckdErr            -46     Volume is locked or read-only
02074         paramErr            -50     No default volume
02075         dirNFErr            -120    Directory not found or incomplete pathname
02076         afpAccessDenied     -5000   User does not have the correct access
02077         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02078     
02079     __________
02080     
02081     See also:   SetIsStationery, FSpSetIsStationery, ClearIsStationery
02082 */
02083 
02084 /*****************************************************************************/
02085 
02086 pascal  OSErr   SetHasCustomIcon(short vRefNum,
02087                                  long dirID,
02088                                  ConstStr255Param name);
02089 /*  ¶ Set the hasCustomIcon Finder Flag bit.
02090     The SetHasCustomIcon function sets the hasCustomIcon bit in the
02091     fdFlags word of the specified file or directory's finder information.
02092     
02093     vRefNum input:  Volume specification.
02094     dirID   input:  Directory ID.
02095     name    input:  Pointer to object name, or nil when dirID specifies
02096                     a directory that's the object.
02097     
02098     Result Codes
02099         noErr               0       No error
02100         nsvErr              -35     No such volume
02101         ioErr               -36     I/O error
02102         bdNamErr            -37     Bad filename
02103         fnfErr              -43     File not found
02104         fLckdErr            -45     File is locked
02105         vLckdErr            -46     Volume is locked or read-only
02106         paramErr            -50     No default volume
02107         dirNFErr            -120    Directory not found or incomplete pathname
02108         afpAccessDenied     -5000   User does not have the correct access
02109         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02110     
02111     __________
02112     
02113     See also:   FSpSetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
02114 */
02115 
02116 /*****************************************************************************/
02117 
02118 pascal  OSErr   FSpSetHasCustomIcon(const FSSpec *spec);
02119 /*  ¶ Set the hasCustomIcon Finder Flag bit.
02120     The FSpSetHasCustomIcon function sets the hasCustomIcon bit in the
02121     fdFlags word of the specified file or directory's finder information.
02122     
02123     spec    input:  An FSSpec record specifying the object.
02124     
02125     Result Codes
02126         noErr               0       No error
02127         nsvErr              -35     No such volume
02128         ioErr               -36     I/O error
02129         bdNamErr            -37     Bad filename
02130         fnfErr              -43     File not found
02131         fLckdErr            -45     File is locked
02132         vLckdErr            -46     Volume is locked or read-only
02133         paramErr            -50     No default volume
02134         dirNFErr            -120    Directory not found or incomplete pathname
02135         afpAccessDenied     -5000   User does not have the correct access
02136         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02137     
02138     __________
02139     
02140     See also:   SetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
02141 */
02142 
02143 /*****************************************************************************/
02144 
02145 pascal  OSErr   ClearHasCustomIcon(short vRefNum,
02146                                    long dirID,
02147                                    ConstStr255Param name);
02148 /*  ¶ Clear the hasCustomIcon Finder Flag bit.
02149     The ClearHasCustomIcon function clears the hasCustomIcon bit in the
02150     fdFlags word of the specified file or directory's finder information.
02151     
02152     vRefNum input:  Volume specification.
02153     dirID   input:  Directory ID.
02154     name    input:  Pointer to object name, or nil when dirID specifies
02155                     a directory that's the object.
02156     
02157     Result Codes
02158         noErr               0       No error
02159         nsvErr              -35     No such volume
02160         ioErr               -36     I/O error
02161         bdNamErr            -37     Bad filename
02162         fnfErr              -43     File not found
02163         fLckdErr            -45     File is locked
02164         vLckdErr            -46     Volume is locked or read-only
02165         paramErr            -50     No default volume
02166         dirNFErr            -120    Directory not found or incomplete pathname
02167         afpAccessDenied     -5000   User does not have the correct access
02168         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02169     
02170     __________
02171     
02172     See also:   SetHasCustomIcon, FSpSetHasCustomIcon, FSpClearHasCustomIcon
02173 */
02174 
02175 /*****************************************************************************/
02176 
02177 pascal  OSErr   FSpClearHasCustomIcon(const FSSpec *spec);
02178 /*  ¶ Clear the hasCustomIcon Finder Flag bit.
02179     The FSpClearHasCustomIcon function clears the hasCustomIcon bit in the
02180     fdFlags word of the specified file or directory's finder information.
02181     
02182     spec    input:  An FSSpec record specifying the object.
02183     
02184     Result Codes
02185         noErr               0       No error
02186         nsvErr              -35     No such volume
02187         ioErr               -36     I/O error
02188         bdNamErr            -37     Bad filename
02189         fnfErr              -43     File not found
02190         fLckdErr            -45     File is locked
02191         vLckdErr            -46     Volume is locked or read-only
02192         paramErr            -50     No default volume
02193         dirNFErr            -120    Directory not found or incomplete pathname
02194         afpAccessDenied     -5000   User does not have the correct access
02195         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02196     
02197     __________
02198     
02199     See also:   SetHasCustomIcon, FSpSetHasCustomIcon, ClearHasCustomIcon
02200 */
02201 
02202 /*****************************************************************************/
02203 
02204 pascal  OSErr   ClearHasBeenInited(short vRefNum,
02205                                    long dirID,
02206                                    ConstStr255Param name);
02207 /*  ¶ Clear the hasBeenInited Finder Flag bit.
02208     The ClearHasBeenInited function clears the hasBeenInited bit in the
02209     fdFlags word of the specified file or directory's finder information.
02210     
02211     vRefNum input:  Volume specification.
02212     dirID   input:  Directory ID.
02213     name    input:  Pointer to object name, or nil when dirID specifies
02214                     a directory that's the object.
02215     
02216     Result Codes
02217         noErr               0       No error
02218         nsvErr              -35     No such volume
02219         ioErr               -36     I/O error
02220         bdNamErr            -37     Bad filename
02221         fnfErr              -43     File not found
02222         fLckdErr            -45     File is locked
02223         vLckdErr            -46     Volume is locked or read-only
02224         paramErr            -50     No default volume
02225         dirNFErr            -120    Directory not found or incomplete pathname
02226         afpAccessDenied     -5000   User does not have the correct access
02227         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02228     
02229     __________
02230     
02231     See also:   FSpClearHasBeenInited
02232 */
02233 
02234 /*****************************************************************************/
02235 
02236 pascal  OSErr   FSpClearHasBeenInited(const FSSpec *spec);
02237 /*  ¶ Clear the hasBeenInited Finder Flag bit.
02238     The FSpClearHasBeenInited function clears the hasBeenInited bit in the
02239     fdFlags word of the specified file or directory's finder information.
02240     
02241     spec    input:  An FSSpec record specifying the object.
02242     
02243     Result Codes
02244         noErr               0       No error
02245         nsvErr              -35     No such volume
02246         ioErr               -36     I/O error
02247         bdNamErr            -37     Bad filename
02248         fnfErr              -43     File not found
02249         fLckdErr            -45     File is locked
02250         vLckdErr            -46     Volume is locked or read-only
02251         paramErr            -50     No default volume
02252         dirNFErr            -120    Directory not found or incomplete pathname
02253         afpAccessDenied     -5000   User does not have the correct access
02254         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02255     
02256     __________
02257     
02258     See also:   ClearHasBeenInited
02259 */
02260 
02261 /*****************************************************************************/
02262 
02263 pascal  OSErr   CopyFileMgrAttributes(short srcVRefNum,
02264                                       long srcDirID,
02265                                       ConstStr255Param srcName,
02266                                       short dstVRefNum,
02267                                       long dstDirID,
02268                                       ConstStr255Param dstName,
02269                                       Boolean copyLockBit);
02270 /*  ¶ Copy all File Manager attributes from the source to the destination.
02271     The CopyFileMgrAttributes function copies all File Manager attributes
02272     from the source file or directory to the destination file or directory.
02273     If copyLockBit is true, then set the locked state of the destination
02274     to match the source.
02275 
02276     srcVRefNum  input:  Source volume specification.
02277     srcDirID    input:  Source directory ID.
02278     srcName     input:  Pointer to source object name, or nil when
02279                         srcDirID specifies a directory that's the object.
02280     dstVRefNum  input:  Destination volume specification.
02281     dstDirID    input:  Destination directory ID.
02282     dstName     input:  Pointer to destination object name, or nil when
02283                         dstDirID specifies a directory that's the object.
02284     copyLockBit input:  If true, set the locked state of the destination
02285                         to match the source.
02286     
02287     Result Codes
02288         noErr               0       No error
02289         nsvErr              -35     No such volume
02290         ioErr               -36     I/O error
02291         bdNamErr            -37     Bad filename
02292         fnfErr              -43     File not found
02293         fLckdErr            -45     File is locked
02294         vLckdErr            -46     Volume is locked or read-only
02295         paramErr            -50     No default volume
02296         dirNFErr            -120    Directory not found or incomplete pathname
02297         afpAccessDenied     -5000   User does not have the correct access
02298         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02299     
02300     __________
02301     
02302     See also:   FSpCopyFileMgrAttributes
02303 */
02304 
02305 /*****************************************************************************/
02306 
02307 pascal  OSErr   FSpCopyFileMgrAttributes(const FSSpec *srcSpec,
02308                                          const FSSpec *dstSpec,
02309                                          Boolean copyLockBit);
02310 /*  ¶ Copy all File Manager attributes from the source to the destination.
02311     The FSpCopyFileMgrAttributes function copies all File Manager attributes
02312     from the source file or directory to the destination file or directory.
02313     If copyLockBit is true, then set the locked state of the destination
02314     to match the source.
02315 
02316     srcSpec     input:  An FSSpec record specifying the source object.
02317     dstSpec     input:  An FSSpec record specifying the destination object.
02318     copyLockBit input:  If true, set the locked state of the destination
02319                         to match the source.
02320     
02321     Result Codes
02322         noErr               0       No error
02323         nsvErr              -35     No such volume
02324         ioErr               -36     I/O error
02325         bdNamErr            -37     Bad filename
02326         fnfErr              -43     File not found
02327         fLckdErr            -45     File is locked
02328         vLckdErr            -46     Volume is locked or read-only
02329         paramErr            -50     No default volume
02330         dirNFErr            -120    Directory not found or incomplete pathname
02331         afpAccessDenied     -5000   User does not have the correct access
02332         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02333     
02334     __________
02335     
02336     See also:   CopyFileMgrAttributes
02337 */
02338 
02339 /*****************************************************************************/
02340 
02341 pascal  OSErr   HOpenAware(short vRefNum,
02342                            long dirID,
02343                            ConstStr255Param fileName,
02344                            short denyModes,
02345                            short *refNum);
02346 /*  ¶ Open the data fork of a file using deny mode permissions.
02347     The HOpenAware function opens the data fork of a file using deny mode
02348     permissions instead the normal File Manager permissions.  If OpenDeny
02349     is not available, then HOpenAware translates the deny modes to the
02350     closest File Manager permissions and tries to open the file with
02351     OpenDF first, and then Open if OpenDF isn't available. By using
02352     HOpenAware with deny mode permissions, a program can be "AppleShare
02353     aware" and fall back on the standard File Manager open calls
02354     automatically.
02355 
02356     vRefNum     input:  Volume specification.
02357     dirID       input:  Directory ID.
02358     fileName    input:  The name of the file.
02359     denyModes   input:  The deny modes access under which to open the file.
02360     refNum      output: The file reference number of the opened file.
02361     
02362     Result Codes
02363         noErr               0       No error
02364         nsvErr              -35     No such volume
02365         tmfoErr             -42     Too many files open
02366         fnfErr              -43     File not found
02367         wPrErr              -44     Volume locked by hardware
02368         fLckdErr            -45     File is locked
02369         vLckdErr            -46     Volume is locked or read-only
02370         opWrErr             -49     File already open for writing
02371         paramErr            -50     No default volume
02372         permErr             -54     File is already open and cannot be opened using specified deny modes
02373         afpAccessDenied     -5000   User does not have the correct access to the file
02374         afpDenyConflict     -5006   Requested access permission not possible
02375     
02376     __________
02377     
02378     See also:   FSpOpenAware, HOpenRFAware, FSpOpenRFAware
02379 */
02380 
02381 /*****************************************************************************/
02382 
02383 pascal  OSErr   FSpOpenAware(const FSSpec *spec,
02384                              short denyModes,
02385                              short *refNum);
02386 /*  ¶ Open the data fork of a file using deny mode permissions.
02387     The FSpOpenAware function opens the data fork of a file using deny mode
02388     permissions instead the normal File Manager permissions.  If OpenDeny
02389     is not available, then FSpOpenAware translates the deny modes to the
02390     closest File Manager permissions and tries to open the file with
02391     OpenDF first, and then Open if OpenDF isn't available. By using
02392     FSpOpenAware with deny mode permissions, a program can be "AppleShare
02393     aware" and fall back on the standard File Manager open calls
02394     automatically.
02395 
02396     spec        input:  An FSSpec record specifying the file.
02397     denyModes   input:  The deny modes access under which to open the file.
02398     refNum      output: The file reference number of the opened file.
02399     
02400     Result Codes
02401         noErr               0       No error
02402         nsvErr              -35     No such volume
02403         tmfoErr             -42     Too many files open
02404         fnfErr              -43     File not found
02405         wPrErr              -44     Volume locked by hardware
02406         fLckdErr            -45     File is locked
02407         vLckdErr            -46     Volume is locked or read-only
02408         opWrErr             -49     File already open for writing
02409         paramErr            -50     No default volume
02410         permErr             -54     File is already open and cannot be opened using specified deny modes
02411         afpAccessDenied     -5000   User does not have the correct access to the file
02412         afpDenyConflict     -5006   Requested access permission not possible
02413     
02414     __________
02415     
02416     See also:   HOpenAware, HOpenRFAware, FSpOpenRFAware
02417 */
02418 
02419 /*****************************************************************************/
02420 
02421 pascal  OSErr   HOpenRFAware(short vRefNum,
02422                              long dirID,
02423                              ConstStr255Param fileName,
02424                              short denyModes,
02425                              short *refNum);
02426 /*  ¶ Open the resource fork of a file using deny mode permissions.
02427     The HOpenRFAware function opens the resource fork of a file using deny
02428     mode permissions instead the normal File Manager permissions.  If
02429     OpenRFDeny is not available, then HOpenRFAware translates the deny
02430     modes to the closest File Manager permissions and tries to open the
02431     file with OpenRF. By using HOpenRFAware with deny mode permissions,
02432     a program can be "AppleShare aware" and fall back on the standard
02433     File Manager open calls automatically.
02434 
02435     vRefNum     input:  Volume specification.
02436     dirID       input:  Directory ID.
02437     fileName    input:  The name of the file.
02438     denyModes   input:  The deny modes access under which to open the file.
02439     refNum      output: The file reference number of the opened file.
02440     
02441     Result Codes
02442         noErr               0       No error
02443         nsvErr              -35     No such volume
02444         tmfoErr             -42     Too many files open
02445         fnfErr              -43     File not found
02446         wPrErr              -44     Volume locked by hardware
02447         fLckdErr            -45     File is locked
02448         vLckdErr            -46     Volume is locked or read-only
02449         opWrErr             -49     File already open for writing
02450         paramErr            -50     No default volume
02451         permErr             -54     File is already open and cannot be opened using specified deny modes
02452         afpAccessDenied     -5000   User does not have the correct access to the file
02453         afpDenyConflict     -5006   Requested access permission not possible
02454     
02455     __________
02456     
02457     See also:   HOpenAware, FSpOpenAware, FSpOpenRFAware
02458 */
02459 
02460 /*****************************************************************************/
02461 
02462 pascal  OSErr   FSpOpenRFAware(const FSSpec *spec,
02463                                short denyModes,
02464                                short *refNum);
02465 /*  ¶ Open the resource fork of a file using deny mode permissions.
02466     The FSpOpenRFAware function opens the resource fork of a file using deny
02467     mode permissions instead the normal File Manager permissions.  If
02468     OpenRFDeny is not available, then FSpOpenRFAware translates the deny
02469     modes to the closest File Manager permissions and tries to open the
02470     file with OpenRF. By using FSpOpenRFAware with deny mode permissions,
02471     a program can be "AppleShare aware" and fall back on the standard
02472     File Manager open calls automatically.
02473 
02474     spec        input:  An FSSpec record specifying the file.
02475     denyModes   input:  The deny modes access under which to open the file.
02476     refNum      output: The file reference number of the opened file.
02477     
02478     Result Codes
02479         noErr               0       No error
02480         nsvErr              -35     No such volume
02481         tmfoErr             -42     Too many files open
02482         fnfErr              -43     File not found
02483         wPrErr              -44     Volume locked by hardware
02484         fLckdErr            -45     File is locked
02485         vLckdErr            -46     Volume is locked or read-only
02486         opWrErr             -49     File already open for writing
02487         paramErr            -50     No default volume
02488         permErr             -54     File is already open and cannot be opened using specified deny modes
02489         afpAccessDenied     -5000   User does not have the correct access to the file
02490         afpDenyConflict     -5006   Requested access permission not possible
02491     
02492     __________
02493     
02494     See also:   HOpenAware, FSpOpenAware, HOpenRFAware
02495 */
02496 
02497 /*****************************************************************************/
02498 
02499 pascal  OSErr   FSReadNoCache(short refNum,
02500                               long *count,
02501                               void *buffPtr);
02502 /*  ¶ Read any number of bytes from an open file requesting no caching.
02503     The FSReadNoCache function reads any number of bytes from an open file
02504     while asking the file system to bypass its cache mechanism.
02505     
02506     refNum  input:  The file reference number of an open file.
02507     count   input:  The number of bytes to read.
02508             output: The number of bytes actually read.
02509     buffPtr input:  A pointer to the data buffer into which the bytes are
02510                     to be read.
02511     
02512     Result Codes
02513         noErr               0       No error
02514         readErr             –19     Driver does not respond to read requests
02515         badUnitErr          –21     Driver reference number does not
02516                                     match unit table
02517         unitEmptyErr        –22     Driver reference number specifies a
02518                                     nil handle in unit table
02519         abortErr            –27     Request aborted by KillIO
02520         notOpenErr          –28     Driver not open
02521         ioErr               –36     Data does not match in read-verify mode
02522         fnOpnErr            -38     File not open
02523         rfNumErr            -51     Bad reference number
02524         afpAccessDenied     -5000   User does not have the correct access to
02525                                     the file
02526 
02527     __________
02528     
02529     See also:   FSWriteNoCache
02530 */
02531 
02532 /*****************************************************************************/
02533 
02534 pascal  OSErr   FSWriteNoCache(short refNum,
02535                                long *count,
02536                                const void *buffPtr);
02537 /*  ¶ Write any number of bytes to an open file requesting no caching.
02538     The FSReadNoCache function writes any number of bytes to an open file
02539     while asking the file system to bypass its cache mechanism.
02540     
02541     refNum  input:  The file reference number of an open file.
02542     count   input:  The number of bytes to write to the file.
02543             output: The number of bytes actually written.
02544     buffPtr input:  A pointer to the data buffer from which the bytes are
02545                     to be written.
02546     
02547     Result Codes
02548         noErr               0       No error
02549         writErr             –20     Driver does not respond to write requests
02550         badUnitErr          –21     Driver reference number does not
02551                                     match unit table
02552         unitEmptyErr        –22     Driver reference number specifies a
02553                                     nil handle in unit table
02554         abortErr            –27     Request aborted by KillIO
02555         notOpenErr          –28     Driver not open
02556         dskFulErr           -34     Disk full   
02557         ioErr               –36     Data does not match in read-verify mode
02558         fnOpnErr            -38     File not open
02559         wPrErr              -44     Hardware volume lock    
02560         fLckdErr            -45     File is locked  
02561         vLckdErr            -46     Software volume lock    
02562         rfNumErr            -51     Bad reference number
02563         wrPermErr           -61     Read/write permission doesn’t
02564                                     allow writing   
02565         afpAccessDenied     -5000   User does not have the correct access to
02566                                     the file
02567 
02568     __________
02569     
02570     See also:   FSReadNoCache
02571 */
02572 
02573 /*****************************************************************************/
02574 
02575 pascal  OSErr   FSWriteVerify(short refNum,
02576                               long *count,
02577                               const void *buffPtr);
02578 /*  ¶ Write any number of bytes to an open file and then verify the data was written.
02579     The FSWriteVerify function writes any number of bytes to an open file
02580     and then verifies that the data was actually written to the device.
02581     
02582     refNum  input:  The file reference number of an open file.
02583     count   input:  The number of bytes to write to the file.
02584             output: The number of bytes actually written and verified.
02585     buffPtr input:  A pointer to the data buffer from which the bytes are
02586                     to be written.
02587     
02588     Result Codes
02589         noErr               0       No error
02590         readErr             –19     Driver does not respond to read requests
02591         writErr             –20     Driver does not respond to write requests
02592         badUnitErr          –21     Driver reference number does not
02593                                     match unit table
02594         unitEmptyErr        –22     Driver reference number specifies a
02595                                     nil handle in unit table
02596         abortErr            –27     Request aborted by KillIO
02597         notOpenErr          –28     Driver not open
02598         dskFulErr           -34     Disk full   
02599         ioErr               –36     Data does not match in read-verify mode
02600         fnOpnErr            -38     File not open
02601         eofErr              -39     Logical end-of-file reached
02602         posErr              -40     Attempt to position mark before start
02603                                     of file
02604         wPrErr              -44     Hardware volume lock    
02605         fLckdErr            -45     File is locked  
02606         vLckdErr            -46     Software volume lock    
02607         rfNumErr            -51     Bad reference number
02608         gfpErr              -52     Error during GetFPos
02609         wrPermErr           -61     Read/write permission doesn’t
02610                                     allow writing   
02611         memFullErr          -108    Not enough room in heap zone to allocate
02612                                     verify buffer
02613         afpAccessDenied     -5000   User does not have the correct access to
02614                                     the file
02615 */
02616 
02617 /*****************************************************************************/
02618 
02619 pascal  OSErr   CopyFork(short srcRefNum,
02620                          short dstRefNum,
02621                          void *copyBufferPtr,
02622                          long copyBufferSize);
02623 /*  ¶ Copy all data from the source fork to the destination fork of open file forks.
02624     The CopyFork function copies all data from the source fork to the
02625     destination fork of open file forks and makes sure the destination EOF
02626     is equal to the source EOF.
02627     
02628     srcRefNum       input:  The source file reference number.
02629     dstRefNum       input:  The destination file reference number.
02630     copyBufferPtr   input:  Pointer to buffer to use during copy. The
02631                             buffer should be at least 512-bytes minimum.
02632                             The larger the buffer, the faster the copy.
02633     copyBufferSize  input:  The size of the copy buffer.
02634     
02635     Result Codes
02636         noErr               0       No error
02637         readErr             –19     Driver does not respond to read requests
02638         writErr             –20     Driver does not respond to write requests
02639         badUnitErr          –21     Driver reference number does not
02640                                     match unit table
02641         unitEmptyErr        –22     Driver reference number specifies a
02642                                     nil handle in unit table
02643         abortErr            –27     Request aborted by KillIO
02644         notOpenErr          –28     Driver not open
02645         dskFulErr           -34     Disk full   
02646         ioErr               –36     Data does not match in read-verify mode
02647         fnOpnErr            -38     File not open
02648         wPrErr              -44     Hardware volume lock    
02649         fLckdErr            -45     File is locked  
02650         vLckdErr            -46     Software volume lock    
02651         rfNumErr            -51     Bad reference number
02652         wrPermErr           -61     Read/write permission doesn’t
02653                                     allow writing   
02654         afpAccessDenied     -5000   User does not have the correct access to
02655                                     the file
02656 */
02657 
02658 /*****************************************************************************/
02659 
02660 pascal  OSErr   GetFileLocation(short refNum,
02661                                 short *vRefNum,
02662                                 long *dirID,
02663                                 StringPtr fileName);
02664 /*  ¶ Get the location of an open file.
02665     The GetFileLocation function gets the location (volume reference number,
02666     directory ID, and fileName) of an open file.
02667 
02668     refNum      input:  The file reference number of an open file.
02669     vRefNum     output: The volume reference number.
02670     dirID       output: The parent directory ID.
02671     fileName    input:  Points to a buffer (minimum Str63) where the
02672                         filename is to be returned or must be nil.
02673                 output: The filename.
02674     
02675     Result Codes
02676         noErr               0       No error
02677         nsvErr              -35     Specified volume doesn’t exist
02678         fnOpnErr            -38     File not open
02679         rfNumErr            -51     Reference number specifies nonexistent
02680                                     access path
02681     
02682     __________
02683     
02684     See also:   FSpGetFileLocation
02685 */
02686 
02687 /*****************************************************************************/
02688 
02689 pascal  OSErr   FSpGetFileLocation(short refNum,
02690                                    FSSpec *spec);
02691 /*  ¶ Get the location of an open file in an FSSpec record.
02692     The FSpGetFileLocation function gets the location of an open file in
02693     an FSSpec record.
02694 
02695     refNum      input:  The file reference number of an open file.
02696     spec        output: FSSpec record containing the file name and location.
02697     
02698     Result Codes
02699         noErr               0       No error
02700         nsvErr              -35     Specified volume doesn’t exist
02701         fnOpnErr            -38     File not open
02702         rfNumErr            -51     Reference number specifies nonexistent
02703                                     access path
02704     
02705     __________
02706     
02707     See also:   GetFileLocation
02708 */
02709 
02710 /*****************************************************************************/
02711 
02712 pascal  OSErr   CopyDirectoryAccess(short srcVRefNum,
02713                                     long srcDirID,
02714                                     ConstStr255Param srcName,
02715                                     short dstVRefNum,
02716                                     long dstDirID,
02717                                     ConstStr255Param dstName);
02718 /*  ¶ Copy the AFP directory access privileges.
02719     The CopyDirectoryAccess function copies the AFP directory access
02720     privileges from one directory to another. Both directories must be on
02721     the same file server, but not necessarily on the same server volume.
02722     
02723     srcVRefNum  input:  Source volume specification.
02724     srcDirID    input:  Source directory ID.
02725     srcName     input:  Pointer to source directory name, or nil when
02726                         srcDirID specifies the directory.
02727     dstVRefNum  input:  Destination volume specification.
02728     dstDirID    input:  Destination directory ID.
02729     dstName     input:  Pointer to destination directory name, or nil when
02730                         dstDirID specifies the directory.
02731     
02732     Result Codes
02733         noErr               0       No error
02734         nsvErr              -35     Volume not found
02735         fnfErr              -43     Directory not found
02736         vLckdErr            -46     Volume is locked or read-only
02737         paramErr            -50     Volume doesn't support this function
02738         afpAccessDenied     -5000   User does not have the correct access
02739                                     to the directory
02740         afpObjectTypeErr    -5025   Object is a file, not a directory
02741     
02742     __________
02743     
02744     See also:   FSpCopyDirectoryAccess
02745 */
02746 
02747 /*****************************************************************************/
02748 
02749 pascal  OSErr   FSpCopyDirectoryAccess(const FSSpec *srcSpec,
02750                                        const FSSpec *dstSpec);
02751 /*  ¶ Copy the AFP directory access privileges.
02752     The FSpCopyDirectoryAccess function copies the AFP directory access
02753     privileges from one directory to another. Both directories must be on
02754     the same file server, but not necessarily on the same server volume.
02755 
02756     srcSpec     input:  An FSSpec record specifying the source directory.
02757     dstSpec     input:  An FSSpec record specifying the destination directory.
02758     
02759     Result Codes
02760         noErr               0       No error
02761         nsvErr              -35     Volume not found
02762         fnfErr              -43     Directory not found
02763         vLckdErr            -46     Volume is locked or read-only
02764         paramErr            -50     Volume doesn't support this function
02765         afpAccessDenied     -5000   User does not have the correct access
02766                                     to the directory
02767         afpObjectTypeErr    -5025   Object is a file, not a directory
02768     
02769     __________
02770     
02771     See also:   CopyDirectoryAccess
02772 */
02773 
02774 /*****************************************************************************/
02775 
02776 pascal  OSErr   HMoveRenameCompat(short vRefNum,
02777                                   long srcDirID,
02778                                   ConstStr255Param srcName,
02779                                   long dstDirID,
02780                                   ConstStr255Param dstpathName,
02781                                   ConstStr255Param copyName);
02782 /*  ¶ Move a file or directory and optionally rename it.
02783     The HMoveRenameCompat function moves a file or directory and optionally
02784     renames it.  The source and destination locations must be on the same
02785     volume. This routine works even if the volume doesn't support MoveRename.
02786     
02787     vRefNum     input:  Volume specification.
02788     srcDirID    input:  Source directory ID.
02789     srcName     input:  The source object name.
02790     dstDirID    input:  Destination directory ID.
02791     dstName     input:  Pointer to destination directory name, or
02792                         nil when dstDirID specifies a directory.
02793     copyName    input:  Points to the new name if the object is to be
02794                         renamed or nil if the object isn't to be renamed.
02795     
02796     Result Codes
02797         noErr               0       No error
02798         dirFulErr           -33     File directory full
02799         dskFulErr           -34     Disk is full
02800         nsvErr              -35     Volume not found
02801         ioErr               -36     I/O error
02802         bdNamErr            -37     Bad filename or attempt to move into
02803                                     a file
02804         fnfErr              -43     Source file or directory not found
02805         wPrErr              -44     Hardware volume lock
02806         fLckdErr            -45     File is locked
02807         vLckdErr            -46     Destination volume is read-only
02808         fBsyErr             -47     File busy, directory not empty, or
02809                                     working directory control block open
02810         dupFNErr            -48     Destination already exists
02811         paramErr            -50     Volume doesn't support this function,
02812                                     no default volume, or source and
02813         volOfflinErr        -53     Volume is offline
02814         fsRnErr             -59     Problem during rename
02815         dirNFErr            -120    Directory not found or incomplete pathname
02816         badMovErr           -122    Attempted to move directory into
02817                                     offspring
02818         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
02819         notAFileErr         -1302   The pathname is nil, the pathname
02820                                     is empty, or the pathname cannot refer
02821                                     to a filename
02822         diffVolErr          -1303   Files on different volumes
02823         afpAccessDenied     -5000   The user does not have the right to
02824                                     move the file  or directory
02825         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02826         afpSameObjectErr    -5038   Source and destination files are the same
02827     
02828     __________
02829     
02830     See also:   FSpMoveRenameCompat
02831 */
02832 
02833 /*****************************************************************************/
02834 
02835 pascal  OSErr   FSpMoveRenameCompat(const FSSpec *srcSpec,
02836                                     const FSSpec *dstSpec,
02837                                     ConstStr255Param copyName);
02838 /*  ¶ Move a file or directory and optionally rename it.
02839     The FSpMoveRenameCompat function moves a file or directory and optionally
02840     renames it.  The source and destination locations must be on the same
02841     volume. This routine works even if the volume doesn't support MoveRename.
02842     
02843     srcSpec     input:  An FSSpec record specifying the source object.
02844     dstSpec     input:  An FSSpec record specifying the destination
02845                         directory.
02846     copyName    input:  Points to the new name if the object is to be
02847                         renamed or nil if the object isn't to be renamed.
02848     
02849     Result Codes
02850         noErr               0       No error
02851         dirFulErr           -33     File directory full
02852         dskFulErr           -34     Disk is full
02853         nsvErr              -35     Volume not found
02854         ioErr               -36     I/O error
02855         bdNamErr            -37     Bad filename or attempt to move into
02856                                     a file
02857         fnfErr              -43     Source file or directory not found
02858         wPrErr              -44     Hardware volume lock
02859         fLckdErr            -45     File is locked
02860         vLckdErr            -46     Destination volume is read-only
02861         fBsyErr             -47     File busy, directory not empty, or
02862                                     working directory control block open
02863         dupFNErr            -48     Destination already exists
02864         paramErr            -50     Volume doesn't support this function,
02865                                     no default volume, or source and
02866         volOfflinErr        -53     Volume is offline
02867         fsRnErr             -59     Problem during rename
02868         dirNFErr            -120    Directory not found or incomplete pathname
02869         badMovErr           -122    Attempted to move directory into
02870                                     offspring
02871         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
02872         notAFileErr         -1302   The pathname is nil, the pathname
02873                                     is empty, or the pathname cannot refer
02874                                     to a filename
02875         diffVolErr          -1303   Files on different volumes
02876         afpAccessDenied     -5000   The user does not have the right to
02877                                     move the file  or directory
02878         afpObjectTypeErr    -5025   Directory not found or incomplete pathname
02879         afpSameObjectErr    -5038   Source and destination files are the same
02880     
02881     __________
02882     
02883     See also:   HMoveRenameCompat
02884 */
02885 
02886 /*****************************************************************************/
02887 
02888 pascal  OSErr   BuildAFPVolMountInfo(short flags,
02889                                      char nbpInterval,
02890                                      char nbpCount,
02891                                      short uamType,
02892                                      Str32 zoneName,
02893                                      Str31 serverName,
02894                                      Str27 volName,
02895                                      Str31 userName,
02896                                      Str8 userPassword,
02897                                      Str8 volPassword,
02898                                      AFPVolMountInfoPtr *afpInfoPtr);
02899 /*  ¶ Allocate and initializes the fields of an AFPVolMountInfo record.
02900     The BuildAFPVolMountInfo function allocates and initializes the fields
02901     of an AFPVolMountInfo record before using that record to call
02902     the VolumeMount function.
02903     
02904     flags           input:  The AFP mounting flags. 0 = normal mount;
02905                             set bit 0 to inhibit greeting messages.
02906     nbpInterval     input:  The interval used for VolumeMount's
02907                             NBP Lookup call. 7 is a good choice.
02908     nbpCount        input:  The retry count used for VolumeMount's
02909                             NBP Lookup call. 5 is a good choice.
02910     uamType         input:  The user authentication method to use.
02911     zoneName        input:  The AppleTalk zone name of the server.
02912     serverName      input:  The AFP server name.
02913     volName         input:  The AFP volume name.
02914     userName        input:  The user name (zero length Pascal string for
02915                             guest).
02916     userPassWord    input:  The user password (zero length Pascal string
02917                             if no user password)
02918     volPassWord     input:  The volume password (zero length Pascal string
02919                             if no volume password)
02920     afpInfoPtr      output: A pointer to the newly created and initialized
02921                             AFPVolMountInfo record. If the function fails to
02922                             create an AFPVolMountInfo record, it sets
02923                             afpInfoPtr to NULL and the function result is
02924                             memFullErr. Your program is responsible
02925                             for disposing of this pointer when it is finished
02926                             with it.
02927     
02928     Result Codes
02929         noErr               0       No error
02930         memFullErr          -108    memory full error
02931     
02932     __________
02933     
02934     Also see:   GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
02935                 RetrieveAFPVolMountInfo, BuildAFPXVolMountInfo,
02936                 RetrieveAFPXVolMountInfo
02937 */
02938 
02939 /*****************************************************************************/
02940 
02941 pascal  OSErr   RetrieveAFPVolMountInfo(AFPVolMountInfoPtr afpInfoPtr,
02942                                         short *flags,
02943                                         short *uamType,
02944                                         StringPtr zoneName,
02945                                         StringPtr serverName,
02946                                         StringPtr volName,
02947                                         StringPtr userName);
02948 /*  ¶ Retrieve the AFP mounting information from an AFPVolMountInfo record.
02949     The RetrieveAFPVolMountInfo function retrieves the AFP mounting
02950     information returned in an AFPVolMountInfo record by the
02951     GetVolMountInfo function.
02952     
02953     afpInfoPtr      input:  Pointer to AFPVolMountInfo record that contains
02954                             the AFP mounting information.
02955     flags           output: The AFP mounting flags.
02956     uamType         output: The user authentication method used.
02957     zoneName        output: The AppleTalk zone name of the server.
02958     serverName      output: The AFP server name.
02959     volName         output: The AFP volume name.
02960     userName        output: The user name (zero length Pascal string for
02961                             guest).
02962     
02963     Result Codes
02964         noErr               0       No error
02965         paramErr            -50     media field in AFP mounting information
02966                                     was not AppleShareMediaType
02967     
02968     __________
02969     
02970     Also see:   GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
02971                 BuildAFPVolMountInfo, BuildAFPXVolMountInfo,
02972                 RetrieveAFPXVolMountInfo
02973 */
02974 
02975 /*****************************************************************************/
02976 
02977 pascal  OSErr   BuildAFPXVolMountInfo(short flags,
02978                                       char nbpInterval,
02979                                       char nbpCount,
02980                                       short uamType,
02981                                       Str32 zoneName,
02982                                       Str31 serverName,
02983                                       Str27 volName,
02984                                       Str31 userName,
02985                                       Str8 userPassword,
02986                                       Str8 volPassword,
02987                                       Str32 uamName,
02988                                       unsigned long alternateAddressLength,
02989                                       void *alternateAddress,
02990                                       AFPXVolMountInfoPtr *afpXInfoPtr);
02991 /*  ¶ Allocate and initializes the fields of an AFPXVolMountInfo record.
02992     The BuildAFPXVolMountInfo function allocates and initializes the fields
02993     of an AFPXVolMountInfo record before using that record to call
02994     the VolumeMount function.
02995     
02996     flags                   input:  The AFP mounting flags.
02997     nbpInterval             input:  The interval used for VolumeMount's
02998                                     NBP Lookup call. 7 is a good choice.
02999     nbpCount                input:  The retry count used for VolumeMount's
03000                                     NBP Lookup call. 5 is a good choice.
03001     uamType                 input:  The user authentication method to use.
03002     zoneName                input:  The AppleTalk zone name of the server.
03003     serverName              input:  The AFP server name.
03004     volName                 input:  The AFP volume name.
03005     userName                input:  The user name (zero length Pascal string
03006                                     for guest).
03007     userPassWord            input:  The user password (zero length Pascal
03008                                     string if no user password)
03009     volPassWord             input:  The volume password (zero length Pascal
03010                                     string if no volume password)
03011     uamName                 input:  The User Authentication Method name.
03012     alternateAddressLength  input:  Length of alternateAddress data.
03013     alternateAddress        input   The AFPAlternateAddress (variable length)
03014     afpXInfoPtr             output: A pointer to the newly created and
03015                                     initialized AFPVolMountInfo record.
03016                                     If the function fails to create an
03017                                     AFPVolMountInfo record, it sets
03018                                     afpInfoPtr to NULL and the function
03019                                     result is memFullErr. Your program is
03020                                     responsible for disposing of this pointer
03021                                     when it is finished with it.
03022     
03023     Result Codes
03024         noErr               0       No error
03025         memFullErr          -108    memory full error
03026     
03027     __________
03028     
03029     Also see:   GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
03030                 BuildAFPVolMountInfo, RetrieveAFPVolMountInfo,
03031                 RetrieveAFPXVolMountInfo
03032 */
03033 
03034 /*****************************************************************************/
03035 
03036 pascal  OSErr   RetrieveAFPXVolMountInfo(AFPXVolMountInfoPtr afpXInfoPtr,
03037                                          short *flags,
03038                                          short *uamType,
03039                                          StringPtr zoneName,
03040                                          StringPtr serverName,
03041                                          StringPtr volName,
03042                                          StringPtr userName,
03043                                          StringPtr uamName,
03044                                          unsigned long *alternateAddressLength,
03045                                          AFPAlternateAddress **alternateAddress);
03046 /*  ¶ Retrieve the AFP mounting information from an AFPXVolMountInfo record.
03047     The RetrieveAFPXVolMountInfo function retrieves the AFP mounting
03048     information returned in an AFPXVolMountInfo record by the
03049     GetVolMountInfo function.
03050     
03051     afpXInfoPtr             input:  Pointer to AFPXVolMountInfo record that
03052                                     contains the AFP mounting information.
03053     flags                   output: The AFP mounting flags.
03054     uamType                 output: The user authentication method used.
03055     zoneName                output: The AppleTalk zone name of the server.
03056     serverName              output: The AFP server name.
03057     volName                 output: The AFP volume name.
03058     userName                output: The user name (zero length Pascal
03059                                     string for guest).
03060     uamName                 output: The User Authentication Method name.
03061     alternateAddressLength  output: Length of alternateAddress data returned.
03062     alternateAddress:       output: A pointer to the newly created and
03063                                     AFPAlternateAddress record (a variable
03064                                     length record). If the function fails to
03065                                     create an AFPAlternateAddress record,
03066                                     it sets alternateAddress to NULL and the
03067                                     function result is memFullErr. Your
03068                                     program is responsible for disposing of
03069                                     this pointer when it is finished with it.
03070     
03071     Result Codes
03072         noErr               0       No error
03073         paramErr            -50     media field in AFP mounting information
03074                                     was not AppleShareMediaType
03075         memFullErr          -108    memory full error
03076     
03077     __________
03078     
03079     Also see:   GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
03080                 BuildAFPVolMountInfo, RetrieveAFXVolMountInfo,
03081                 BuildAFPXVolMountInfo
03082 */
03083 
03084 /*****************************************************************************/
03085 
03086 pascal  OSErr   GetUGEntries(short objType,
03087                              UGEntryPtr entries,
03088                              long reqEntryCount,
03089                              long *actEntryCount,
03090                              long *objID);
03091 /*  ¶ Retrieve a list of user or group entries from the local file server.
03092     The GetUGEntries functions retrieves a list of user or group entries
03093     from the local file server.
03094 
03095     objType         input:  The object type: -1 = group; 0 = user
03096     UGEntries       input:  Pointer to array of UGEntry records where the list
03097                             is returned.
03098     reqEntryCount   input:  The number of elements in the UGEntries array.
03099     actEntryCount   output: The number of entries returned.
03100     objID           input:  The current index position. Set to 0 to start with
03101                             the first entry.
03102                     output: The index position to get the next entry. Pass this
03103                             value the next time you call GetUGEntries to start
03104                             where you left off.
03105     
03106     Result Codes
03107         noErr               0       No error    
03108         fnfErr              -43     No more users or groups 
03109         paramErr            -50     Function not supported; or, ioObjID is
03110                                     negative    
03111 
03112     __________
03113     
03114     Also see:   GetUGEntry
03115 */
03116 
03117 /*****************************************************************************/
03118 
03119 #ifdef __cplusplus
03120 }
03121 #endif
03122 
03123 #include "OptimizationEnd.h"
03124 
03125 #endif  /* __MOREFILESEXTRAS__ */

Generated on Wed May 31 18:19:56 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6