At 12:16 PM 10/29/2003 -0500, Adam Trachtenberg wrote:
On Wednesday, October 29, 2003, at 11:39 AM, Andi Gutmans wrote:

Is it case-preserving like Windows? Does realpath work on MAC OS X and give the case preserved name?

I don't have easy access to a Windows machine to test, but I think the answer is yes:


[EMAIL PROTECTED]:~/Documents/php/test] $ ls -l
total 0
-rw-r--r--  1 adam  staff  0 Oct 29 12:10 foo
[EMAIL PROTECTED]:~/Documents/php/test] $ php -r 'print realpath("foo") . "\n";'
/Users/adam/Documents/php/test/foo
[EMAIL PROTECTED]:~/Documents/php/test] $ php -r 'print realpath("FOO") . "\n";'
/Users/adam/Documents/php/test/FOO

realpath() will return a case-preserved match of the original file, but will match the name regardless of case.

That's not what I meant. I didn't mean it should preserve the name you pass to realpath(). I meant it should give the name which is saved by the OS in the filesystem. Win32 is case-insensitive but it does have the case preserved version saved.


Andi

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to