home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!sun!amdcad!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: system call to get AmigaDos PATH string(s) ?
- Message-ID: <paulk.3cz7@terapin.com>
- Date: 21 Jan 93 03:40:14 GMT
- References: <1993Jan17.230704.27737@philips.oz.au>
- Organization: BBS
- Lines: 19
-
- > system call to get AmigaDos PATH string(s) ?
-
- > One klugey way is :-
- >
- > Execute ("PATH >T:file", 0L,0L);
- >
- > then parse T:file.
- >
- > But there's got to be a neater way.
-
- What you gots ta do is follow the BPTR list in cli_CommandDir of the
- struct CommandLineInterface of the process that has the path you want
- to trace. It's a list in which each node is a BPTR to the next node,
- and a FileLock BPTR. Convert the locks to path strings the usual way
- -- either with LockToPath() or, under 1.x, a loop doing ParentDir()
- and Examine().
-
- This list does not include the "Current directory" at the beginning and "C:" at
- the end that you see in the output from "Path".
-