[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installation on windows (fwd)
From: |
Richard Frith-Macdonald |
Subject: |
Re: Installation on windows (fwd) |
Date: |
Wed, 16 Mar 2005 15:50:54 +0000 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2005-03-16 15:28:25 +0000 David Ayers <address@hidden> wrote:
The first paragraph was talking about the implicit conversion that OPENSTEP
for NT does. It would allow things like:
[@"test" writeToFile: @"C:\\Temp/test.txt" atomically: YES];
s = [NSString stringWithContentsOfFile: @"C:/Temp\\test.txt"];
I don't know whether we currently also support this on cygwin/msys/mingw
but
this has lead to real confusion and down right problems with some versions
of
OPENSTEP (or WebObjects) that didn't always handle it correctly.
We don't support it ... but I think the examples you provide would work.
The reason being ... we expect paths to be in posix format internally and
convert to windows native format at the point when we do a file operation.
In both cases, those strings look like relative posix path names containing
a single separator ...
so 'C:\Temp/test.txt' would get the '/' converted to '\' and end up as
'C:\Temp\test.txt' in the windows native format, and 'C:/Temp\text.txt'
would similarly end up as 'C:\Temp\text.txt' at the point where it is passed
to the windows system call to write or read the file.
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?
But yes, the current GNUstep implementation seem to be pretty much what I
would aim at "If I were to start from scratch" plus the conversion methods.
So that we could do something like:
env = @"C:\\SomePath\\SomeFile"
path = [env pathRepresentationPOSIX];
env = [path pathRepresentationWindows];
Well I don't like the method names but you get the idea. I'm not sure how
useful a -pathRepresentationNative would be.
NSFileManager (from OPENSTEP) has conversion to/from C-string path
representations on the local filesystem
New GNUstep specific additions are localFromOpenStepPath: and
openStepPathFromLocal: whee the 'OpenStep' representation is the
posix/internal representation, and the 'Local' representation is windows (if
you are running on windows) ... they do nothing if you are running on unix..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using the GPG bundle for GNUMail
iD8DBQFCOFXeE6AJp3nmKIkRAvSNAJ9dLq8XjBCP3RrWIfi+4TkkER0MlwCgxfGN
Qgqp72P1L597mNV3YSHq/2E=
=aiL3
-----END PGP SIGNATURE-----
Re: Installation on windows (fwd), Richard Frith-Macdonald, 2005/03/16
Re: Installation on windows (fwd), David Ayers, 2005/03/16
- Re: Installation on windows (fwd), Richard Frith-Macdonald, 2005/03/16
- Re: Installation on windows (fwd), David Ayers, 2005/03/16
- Re: Installation on windows (fwd),
Richard Frith-Macdonald <=
- Re: Installation on windows (fwd), David Ayers, 2005/03/16
- Re: Installation on windows (fwd), Jeremy Bettis, 2005/03/16
- Re: Installation on windows (fwd), Richard Frith-Macdonald, 2005/03/16
- Re: Installation on windows (fwd), David Ayers, 2005/03/17
- Re: Installation on windows (fwd), Jeremy Bettis, 2005/03/17
- Re: Installation on windows (fwd), Richard Frith-Macdonald, 2005/03/17
Re: Installation on windows (fwd), Sheldon Gill, 2005/03/16
Re: Installation on windows (fwd), Sheldon Gill, 2005/03/16