Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!rsoft!mindlink!a347 From: John_Miller@mindlink.bc.ca (John Miller) Newsgroups: comp.sys.mac.hypercard Subject: RE: FSOpen() XFCN query Message-ID: <6389@mindlink.bc.ca> Date: 19 Jun 91 13:59:14 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 36 In article <8474@oasys.dt.navy.mil>, Mark Zimmermann writes > My attempts to provide a colon-delimited path as part of > the fileName given to FSOpen() also have failed. > > So, any advice? My ultimate goal is to simply find out > the vRefNum for the directory in which my stack is stored, > and to open a named file in that very directory. Would > it work to ask HyperCard to provide me with "the long name of > this stack" and then to edit that into shape? But what about > the vRefNum that I need to provide FSOpen()?? If it was a full pathname -- that is, a complete specification including the volume name -- it should work. You don't have to worry about the vRefNum. If it is a full pathname, it is overrides the volume reference number (which is actually a working directory in most cases under HFS). A catch is that you full pathname must fit within 255 characters, a limit that Apple's Tech Notes and DTS group condemn, but not too many paths are longer. Besides, it is a limitation you can share with HyperCard: HyperCard does not like pathnames greater than 255 characters. If you want to remove the 255 character limit, you have to parse the name yourself using routines such as PBGetCatInfo(). You might also consider whether the new callback GetFilePath is appropriate for your needs. It uses HyperCard's search paths, which is useful in some cases. _________________________________________________________________ John Miller (604) 433-1795 Symplex Systems usenet: john_miller@mindlink.uucp Macintosh Consulting and Software Development _________________________________________________________________