home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!po.CWRU.Edu!jxs18
- From: jxs18@po.CWRU.Edu (Jerry Sy)
- Subject: Re: PROGRAMMING PROB: How do you find the system folder?
- Message-ID: <1992Jul23.170016.11326@usenet.ins.cwru.edu>
- Sender: news@usenet.ins.cwru.edu
- Nntp-Posting-Host: cwns1.ins.cwru.edu
- Reply-To: jxs18@po.CWRU.Edu (Jerry Sy)
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- References: <1992Jul22.183946.20587@CS.ORST.EDU>
- Date: Thu, 23 Jul 92 17:00:16 GMT
- Lines: 35
-
-
- In a previous article, gonzalm@prism.cs.orst.edu (Mario Gonzales) says:
-
- >
- >Hi all,
- >
- >I have looked in vain to find the function that will return the loaction of
- >the system folder. I can find the boot disk but the system folder is
- >not allways called the "system folder" on the startup disk.
- >
- >Also what is the easiest way to traverse the entire directory structure
- >of a disk?
- >
- >If possible could you provide code samples?
- >
- >Any help is most appreciated!
- >
- >
- To locate a particular folder (that is, to find its volume reference
- number and directory ID), use the FindFolder routine:
-
- pascal OSErr FindFolder(short vRefNum, OSType folderType,
- Boolean createFolder, short *foundVRefNum,
- long *foundDirID);
- where you supply vRefNum= kOnSystemDisk , to look in boot volume
- folderType = kSystemFolderType, you want the Sys Folder right ?
- createFolder= FALSE, you don't want to create a new folder if not found
-
- and you get in return your foundVRefNum and foundDirID
-
- the above code is from Programming for System 7 by Gary Little.
- Get this book, highly recommended.
-
-
-