Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!uxc!tank!eecae!cps3xx!rang From: rang@cpsin3.cps.msu.edu (Anton Rang) Newsgroups: comp.sys.mac.programmer Subject: Re: Mac file IO Message-ID: <3264@cps3xx.UUCP> Date: 3 Jun 89 05:29:24 GMT References: <16464@paris.ics.uci.edu> Sender: usenet@cps3xx.UUCP Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Organization: Michigan State University, Computer Science Dept. Lines: 29 In-reply-to: poleary@BONNIE.ICS.UCI.EDU's message of 2 Jun 89 20:02:31 GMT In article <16464@paris.ics.uci.edu> poleary@BONNIE.ICS.UCI.EDU (Peter O'Leary) writes: An application that I am working on needs to save information on a file so that that file may be opened later. What is the minimum amount of info [] that is needed in order to get at a file? So far, I have been storing the file's name and volume reference number. It depends on how much later you need the file, to some extent, but what I'd recommend storing is: Volume name (refnum is only valid for one session) Directory ID (for an HFS volume) File name For an MFS volume, you can assume that the file version is 0 without problems unless some other weird software is changing the version. Also, in theory, all you should need is: Volume name Directory ID File number but I don't know of any file system call to open a file by number, so I think you need to use the filename. +---------------------------+------------------------+ | Anton Rang (grad student) | "VMS Forever!" | | Michigan State University | rang@cpswh.cps.msu.edu | +---------------------------+------------------------+