Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!wuarchive!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: Checking to see if a file's a link Message-ID: <1991May13.092945.30668@kuhub.cc.ukans.edu> Date: 13 May 91 14:29:45 GMT References: <15127@darkstar.ucsc.edu> <1991Apr29.160901.30173@kuhub.cc.ukans.edu> <28449@neptune.inf.ethz.ch> Organization: University of Kansas Academic Computing Services Lines: 24 >>2.0 dos.library has a function called SameLock() that takes two locks >>and returns TRUE if they are the same object... If >>you get a match, you've made a cycle and skip that link, otherwise, >>you can proceed with that link safely. > >>Mark Gooderum Only... \ Good Cheer !!! > > Nice idea, really. But it has its drawbacks, too... True. I wasn't trying to avoid doing the same dir twice, only avoiding looping. At least you then know a 'DIR ALL' type command will eventually complete. Whether to actually step into a link is a semantic issue. I have played around a bit (writing a better search for a file program), and decided to go with the default of following hard links and ignoring soft links. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: mgooderum \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~