Re: Reducing the number of system calls for includes

From: Date: Sat, 25 Jan 2003 15:18:03 +0000
Subject: Re: Reducing the number of system calls for includes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-93680@lists.php.net to get a copy of this message
> >Another idea would be to try to streamline the normal case for an absolute > >pathname. How about doing a readlink() on it. If that tells us that it > >is a link, then we know there is something funky and we can do a realpath, > >otherwise we just assume it is canonical assuming there are no . .. or // > >in the filename in which case we fall back to a realpath() as well. > > Hmm I'm not sure this would give you what you're looking for. I think it > only works if the last element of the path is a symbolic link but I might > be wrong. I'm not quite sure of the semantics of readlink(). You are right. Somehow I had it in my head that readlink() would catch any part of the path being a link. -Rasmus

« previous php.dev (#93680) next »