[Solar-talk] Re: Solar_Path_Stack: finding absolute paths
Andreas Ravnestad
andreas.ravnestad at gmail.com
Fri Oct 26 16:25:50 CDT 2007
Paul M Jones wrote:
>
> On Oct 26, 2007, at 4:01 PM, Rodrigo Moraes wrote:
>
>> On 10/26/07, Rodrigo Moraes wrote:
>>> public function findAbsolute($file)
>>> {
>>> foreach ($this->_stack as $dir) {
>>> $spec = Solar_File::exists($dir . $file);
>>> if ($spec) {
>>> return $spec;
>>> }
>>> }
>>> return false;
>>> }
>>
>> well, i got what i needed but now looking at it the method has a bad
>> name. it doesn't look for an absolute path, only returns the absolute
>> path if found.
>>
>> it is used in a case where i need to inspect some properties (modified
>> date, size) of the file name returned by the stack.
>
> Hm ... what might a better name be?
>
Maybe lend from Unix and use something with "realpath"? (a common unix
command to find absolute path)
I love bike sheds :)
-Andreas
More information about the Solar-talk
mailing list