Am 28.11.2008 um 19:22 schrieb Tommy Nordgren:
try using -[NSString fileSystemRepresentation]
Actually, that was my 1st attempt :)
Meanwhile I have a solution better than replacing all potentially
"evil" characters with an underscore:
for( i = 0; i < [temporaryPath length]; i++)
On Fri, Nov 28, 2008 at 10:22 AM, Tommy Nordgren
<[EMAIL PROTECTED]> wrote:
>
> On Nov 27, 2008, at 1:09 AM, Knut Lorenzen wrote:
>
>> Dear list,
>>
>> I would like to name a file according to an user defined entry. However,
>> the user's name entry might be illegal as a filepath, containing illega
On Nov 27, 2008, at 1:09 AM, Knut Lorenzen wrote:
Dear list,
I would like to name a file according to an user defined entry.
However, the user's name entry might be illegal as a filepath,
containing illegal characters for a pathname like "." or "-" as 1st
character, "/", ":", etc.
I've
> To make things worse, there's no way to query a filesystem and ask it
> what characters it doesn't like (as far as I know). Worse yet, you
> can't even reliably query a filesystem and find out what kind of
> filesystem it actually *is*.
Which, just for the purposes of illustration, can show up i
Am 27.11.2008 um 06:11 schrieb Michael Ash:
There really isn't, because it's a pretty hard problem.
Mike,
thanks for your detailed reply.
My case (one or two files a week or so) does not justify more than a
few lines of code and string length is not a problem either. I think
I'll simpl
Am 27.11.2008 um 01:22 schrieb Kiel Gillard:
Can you use NSSavePanel? It handles all that detail for you.
Unfortunately not.
Alternatively, try using NSString's stringByAppendingPathComponent:
method, it may validate the path component you're trying to add.
Tried that, but stringByAppend
On Wed, Nov 26, 2008 at 7:09 PM, Knut Lorenzen <[EMAIL PROTECTED]> wrote:
> Dear list,
>
> I would like to name a file according to an user defined entry. However, the
> user's name entry might be illegal as a filepath, containing illegal
> characters for a pathname like "." or "-" as 1st character
On 27/11/2008, at 11:09 AM, Knut Lorenzen wrote:
Dear list,
I would like to name a file according to an user defined entry.
However, the user's name entry might be illegal as a filepath,
containing illegal characters for a pathname like "." or "-" as 1st
character, "/", ":", etc.
I've l
Dear list,
I would like to name a file according to an user defined entry.
However, the user's name entry might be illegal as a filepath,
containing illegal characters for a pathname like "." or "-" as 1st
character, "/", ":", etc.
I've looked into the Cocoa docs for NSString and NSFileMa