ir10@sdcc6.ucsd.EDU (Donald R. Fredkin) (04/23/88)
Does anyone know why PBHGetFInfo modifies the field ioDirID in the HParamBlockRec it is given? What, if anything, is the significance of modified value? -- UUCP {ihnp4,decvax!ucbvax,dcdwest,ucbvax}!ucsd.edu!drfredkin Internet drfredkin@ucsd.edu or drf%sdph2@ucsd.edu Bitnet drfredkin@ucsd
jv0l+@andrew.cmu.edu (Justin Chris Vallon) (04/23/88)
[question about why ioDirID is modified in HGetFileInfo] "When returned from a routine, ioDirID contains the file number of a file; most programmers needn't be concerned with file numbers, but those interested can read ..." - IM IV-122 It really is buried away in the docs, but there you have it. Note also that you'll end up resetting the dirId after each iteration when doing a directory search, but you knew that already ;-> It's a hack, but I guess making the paramBlock 4 bytes longer isn't something they wanted to do. -Justin
darin@Apple.COM (Darin Adler) (04/27/88)
In article <3691@sdcc6.ucsd.EDU> ir10@sdcc6.ucsd.EDU (Donald R. Fredkin) writes: > Does anyone know why PBHGetFInfo modifies the field ioDirID in the > HParamBlockRec it is given? What, if anything, is the significance > of modified value? The value returned in ioDirID is the id of the parent directory of the file, i.e. the directory that contains it. This can be useful if you passed a working directory in the ioVRefNum field. -- Darin Adler AppleLink:Adler4 UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin CSNET: darin@Apple.com
darin@Apple.COM (Darin Adler) (05/13/88)
In article <8998@apple.Apple.Com> darin@apple.UUCP (Darin Adler) I wrote: > In article <3691@sdcc6.ucsd.EDU> ir10@sdcc6.ucsd.EDU (Donald R. Fredkin) writes: > > Does anyone know why PBHGetFInfo modifies the field ioDirID in the > > HParamBlockRec it is given? What, if anything, is the significance > > of modified value? > > The value returned in ioDirID is the id of the parent directory of the file, > i.e. the directory that contains it. This can be useful if you passed a > working directory in the ioVRefNum field. Whoops! I was completely mistaken here! The value returned in ioDirID is what is called the "file ID". This is a unique number assigned to each file on an HFS volume when it is created. It is created in the same way that a dirID is ... the volume starts with 1 and gives a new number to each new file or directory. As a matter of fact, there is only one set of numbers, shared by both files and directories. Sorry about the incorrect information. -- Darin Adler AppleLink:Adler4 UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin CSNET: darin@Apple.com