Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker!apple!mattd From: mattd@Apple.COM (Matt Deatherage) Newsgroups: comp.sys.apple2 Subject: Re: Parent pointers Message-ID: <44582@apple.Apple.COM> Date: 6 Sep 90 20:16:45 GMT References: <5928366@ub.cc.umich.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 24 In article <5928366@ub.cc.umich.edu> Tabakal@UB.CC.UMICH.EDU writes: >Do standard ProDOS subdirectories have a pointer to their parent >directory? Or do they have to scan from root to find it? It seems >that noone implements the equivalent of a .. parameter when they >implement a change directory command (with the exception of APW). >I've never understood why. It's very useful when you're hopping >from children to parent to sibling directories. > It's not there for application use, generally -- it's there for the file system's use. If you OPEN and READ a directory, you won't ever see the parent pointers - only if you do block access will you see them, and that makes you incompatible with AppleShare. Davex implements a .. directory walking command (which as Doug Gwyn points out can be done by simply stripping off the last part of any prefix), but it doesn't work multiply. (for example, "cd .." works but "cd ../.." doesn't.) -- ============================================================================ Matt Deatherage, Apple Computer, Inc. | "The opinions represented here are Developer Technical Support, Apple II | not necessarily those of Apple Group. Personal mail only, please. | Computer, Inc. Remember that." ============================================================================