Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!inria!imag!iron From: iron@imag.imag.fr (Francois Menneteau) Newsgroups: comp.sys.mac.programmer Subject: Implementation of Get Info for Catalog Keywords: ... Message-ID: <4471@imag.imag.fr> Date: 23 Feb 89 17:33:15 GMT Organization: IMAG, University of Grenoble, France Lines: 46 I want do realize the "Get Info feature" by program e.g I want a procedure, say GetCatFilesInfo, that gives me the entire size of a specific catalog, and the number of files and catalogs within this catalog. Thus, reading IM..., I must use GetCatInfo(). The body of the procedure (in C) is : OsErr GetCatFilesInfo(TheCInfoPBPtr) CInfoPBPtr TheCInfoPBPtr ; { do a GetCatInfo(TheCInfoPBPtr) ; do a PBOpenWD(&LocalWDPBRec) ; for ( i = 1 ; i < TheCInfoPBPtr->dirInfo.ioDrNmFls ; i++ ) { working on a local CinfoPBRec, retrieve info for each file (using ioFDirIndex and ioDrDirID fields). GetCatInfo(&LocalCInfoPBRec) ; if ( file is a directory ) { call GetCatFilesInfo() ; /* THE PROBLEM IS HERE!!!!!! WHICH FIELDS MUST I USE, IN ORDER TO RETRIEVE RECURSIVELY THE OTHER FILES AND CATALOGS ? */ } retrieve ioFlLgLen and ioFlRlgLen and other stuffs, from LocalCInfoPBRec. } do a PBCloseWD(&LocalWDPBRec) ; } Any information or C source code will be very appreciate. -- \\\\\\\\\\\\\\\\\\\\\\\\\\ "... I had their lives in my hands \ iron@imag.imag.fr \ their fate their fortune in my visions / uunet.uu.net!imag!iron / No one believed in my true prophecy ////////////////////////// And now it's too late."