static pascal OSErr GetDirectoryID(short vRefNum, long dirID, ConstStr255Param name, long *theDirID, Boolean *isDirectory) { CInfoPBRec pb; OSErr error; error = GetCatInfoNoName(vRefNum, dirID, name, &pb); if ( error == noErr ) { *isDirectory = (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0; if ( *isDirectory ) { *theDirID = pb.dirInfo.ioDrDirID; } else { *theDirID = pb.hFileInfo.ioFlParID; } } return ( error ); }
/* ** GetCommentID ** ** Get the comment ID number for the Desktop file's 'FCMT' resource ID from ** the file or folders fdComment (frComment) field. */ static OSErr GetCommentID(short vRefNum, long dirID, ConstStr255Param name, short *commentID) { CInfoPBRec pb; OSErr error; error = GetCatInfoNoName(vRefNum, dirID, name, &pb); *commentID = pb.hFileInfo.ioFlXFndrInfo.fdComment; return ( error ); }
static OSErr GetDestinationDirInfo(short vRefNum, long dirID, ConstStr255Param name, long *theDirID, Boolean *isDirectory, Boolean *isDropBox) { CInfoPBRec pb; OSErr error; pb.dirInfo.ioACUser = 0; /* ioACUser used to be filler2, clear it before calling GetCatInfo */ error = GetCatInfoNoName(vRefNum, dirID, name, &pb); *theDirID = pb.dirInfo.ioDrDirID; *isDirectory = (pb.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0; /* see if access priviledges are make changes, not see folder, and not see files (drop box) */ *isDropBox = userHasDropBoxAccess(pb.dirInfo.ioACUser); return ( error ); }