Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.hypercard Subject: Re: XFCN to return directory name Summary: Here is some info on one Keywords: directory XFCN Message-ID: <5964@umd5.umd.edu> Date: 18 Jan 90 17:59:21 GMT References: <1326@ariel.unm.edu> Reply-To: zben@umd5.umd.edu (Ben Cranston) Organization: University of Maryland, College Park Lines: 45 In article <1326@ariel.unm.edu> stone@hydra.unm.edu (Andrew Stone) writes: > Is there an XFCN for returning a folder name yet? And then get a list of > say, all 'TEXT' docs in that directory? I wrote one (just a simple interface to ioDirIndex call to GetCatInfo) as a simple project to see if I could do an XFCN in assembly code. There must be a canonical (probably third or fourth generation) one out there. I'd be glad to give mine out. I always wanted to extend it to return the names of all the mounted volumes, so you could use it to do a complete filesystem scan. Would entertain suggestions... Here's some info: * * Hypercard XCMD to scan the members of an HFS directory. * * Call: DirInfo objectname index * * If index not present, returns information about objectname * Otherwise index'th member object of directory objectname * * Information is returned in these Hypercard global variables: * * DIResult Global var for result * 'DirInfo 1 Bad number of arguments' * 'DirInfo 2 Non digit in index number' * 'DirInfo 3 Error in GetCatInfo call' * 'DirInfo 4 Error in GetCatInfo(x) call' * 'DirInfo 5 Error in Hypercard Callback' * DIObjType Type (dir/file) * 'File' * 'Directory' * DIObjName Object name * DINumObj If directory, number of objects in directory * DIFileType File type (4 letters) * DIFileCreator File creator signature (4 letters) -- Sig DS.L ('ZBen') ; Ben Cranston * Network Infrastructures Group, Computer Science Center * University of Maryland at College Park * of Ulm