home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
- From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
- Newsgroups: comp.unix.programmer
- Subject: Re: pathname "cleanup" routine
- Message-ID: <HURTTA.92Sep10142337@plootu.Helsinki.FI>
- Date: 10 Sep 92 12:23:37 GMT
- References: <1992Sep10.043443.20693@leland.Stanford.EDU>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: Department of Computer Science, University of Helsinki, Finland
- Lines: 14
- In-Reply-To: schemers@leland.Stanford.EDU's message of 10 Sep 92 04: 34:43 GMT
-
- In article <1992Sep10.043443.20693@leland.Stanford.EDU> schemers@leland.Stanford.EDU (Roland Schemers) wrote:
- > Before I reinvent the wheel, does anyone have or know of a
- > pathname "cleanup" function that will do the following:
- >
- > Remove "/../" and "/./" and "//" from a path.
- > Expand ~ and environment variables.
- > Add leading "/" if not present.
-
- Warning:
-
- if tmp is symbolic link, then
- tmp/../foo isn't same as foo
-
- - K E H
-