Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site druca.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!drutx!druca!dewi From: dewi@druca.UUCP (WilliamsD) Newsgroups: net.micro.amiga Subject: Finding the current directory... Message-ID: <102@druca.UUCP> Date: Wed, 19-Feb-86 17:31:25 EST Article-I.D.: druca.102 Posted: Wed Feb 19 17:31:25 1986 Date-Received: Thu, 20-Feb-86 08:07:38 EST Organization: AT&T Bell Labs, Denver, Co Lines: 39 Keywords: AmigaDOS,current directory I'd like to bring up an issue that was discussed some time back -- finding the current directory under AmigaDOS. As I remember it, the consensus was that passing a null string would work. Looking at some PD C programs that do "ls" style things, this seems to be what everybody does. There's only one problem, though -- this doesn't work on the RAM disk! This is what happens: 1> cd df0:/s 1> cd "" 1> cd df0:/s 1> cd ram:c 1> cd "" Can't find I'm waiting for my Manx C compiler to arrive and only have the assembler package to play with at the moment (with no ROM Kernel docs yet!) so the scope of my experimentation is limited -- especially with the worthless assembler package documentation (I seem to have purchased a debugger called romWack but it's not mentioned anywhere!). Some of the data structures in libraries/dosextens.i seem to hold a lock on the current directory (from memory, there's a field called pr_Currentdir or somesuch). The only problem is getting at it -- does anybody know if DeviceProc can return info on the *calling process* ? How about putting a GetCurrentDir() call into the dos library in the next release -- trying to figure it out by relying on side effects is kind of silly. Dewi Williams ..!ihnp4!druca!dewi -- ---------------------------------------------------------------------- Dewi Williams. uucp: ..!ihnp4!druca!dewi phone: (303) 538 4884