home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!decwrl!world!aep
- From: aep@world.std.com (Andrew E Page)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Directory Scanning Code (non-sys7) Interface req
- Message-ID: <Bt8ttI.Jn3@world.std.com>
- Date: 19 Aug 92 18:24:53 GMT
- Article-I.D.: world.Bt8ttI.Jn3
- References: <Bt8Guu.308@world.std.com>
- Organization: The World Public Access UNIX, Brookline, MA
- Lines: 62
-
-
- Here are some of the prototypes so far. And I'd like some feedback
- on whether or not this suits your needs. I'm trying to make it do
- sort of an emulation of _SFGetFile in its use of a typelist and
- a filter function. If I do everything correctly you should be able
- to use any filter that you've concocted before for _SFGetFile with
- this scanning function.
-
- Ptr StartScan(int vRef, int numTypes, SFTypeList, typeList, FileFilterProcPtr filter) ;
- /*
- * StartScan starts the directory scan. It will return 0L if the call failed
- * or a pointer to be used in subsequent calls.
- *
- *
- * vRef Volume/Directory where scan is to start.
- *
- * numTypes Number of types to limit scan too.
- * -1 indicates to scan all types.
- *
- * typeList Array of OSTypes with numTypes elements.
- * Pass 0L if numTypes is -1
- *
- * filter Filter proc of the variety used by SFGetFile.
- * Pass 0L for no filtering.
- *
- * pascal Boolean MyFilter(fileParamPtr *f) ;
- * MyFilter returns TRUE if file is to be excluded.
- * or FALSE if it isn't.
- */
-
-
- OSErr GetNextScanFile(Ptr scanPtr, char *fName, short *vRef) ;
- /*
- * Each call to GetNextScanFile will retreive the next file in the
- * directory tree. GetNextScanFile will return a fnfErr when the
- * scan is completed.
- *
- *
- * scanPtr Ptr returned from StartScan
- *
- * fName string space for returned file name (recommened length 64)
- *
- * vRef Pointer to short where Volume/Directory reference for
- * that file is to be placed.
- */
-
- OSErr StopScan(Ptr scanPtr) ;
-
- /*
- * Terminates the scan started by Start scan.
- *
- *
- * scanPtr Ptr returned by StartScan.
- *
- *
- */
-
- DoD# 0581 1990 Suzuki VX800 MSF Intro Class Aug 1990
- --
- Andrew E. Page CTO(Warrior Poet)| Decision and Effort The Archer and Arrow
- DSP Ironworks | The difference between what we are
- Macintosh and DSP Technology | and what we want to be.
-