-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2005-03-16 19:38:44 +0000 Jeremy Bettis <address@hidden> wrote:
However, -lastPathComponent would return 'test.txt' for the first
string and
'Temp\test.txt' for the second string as these are assumed to be posix
paths.
Perhaps OPENSTEP did the same thing?
I can tell you from experience what OPENSTEP did. Methods like
writeToFile: didn't touch the filename at all. Remember windows
doesn't care which way the slashes go, so fopen("c:\\temp\\text.txt",
"r") is EXACTLY the same as fopen("c:/temp/text.txt", "r") is EXACTLY
the same as fopen("c:\\temp/text.txt", "r"). And lastPathComponent
would return the part of the string after either / or \.
So [@"c:/temp\\text.txt" lastPathComponent] returned @"text.txt" and
[@"c:\\temp/text.txt" lastPathComponent] returned @"text.txt" also.
And I wish gnustep worked the same way.
Oops ... I got it wrong ... GNUstep *will* do that on mingw. It always
uses
'/' for building paths,
but will accept '\\' when parsing them on mingw.
I'm not at all sure that is *good* behavior though ... why do you 'wish
gnustep worked the same way' ?
Given that it apparently does work the same way, I guess your desire is
theoretical rather than practical as you can't have had any problems
with it
not doing that.