Re: Localizing absolute file name in Cocoa
Re: Localizing absolute file name in Cocoa
- Subject: Re: Localizing absolute file name in Cocoa
- From: Michael Ash <email@hidden>
- Date: Fri, 22 May 2009 15:01:41 -0400
On Fri, May 22, 2009 at 1:54 PM, Ken Thomases <email@hidden> wrote:
> On May 22, 2009, at 12:48 PM, Michael Ash wrote:
>
>> On Fri, May 22, 2009 at 1:15 PM, Arun <email@hidden> wrote:
>>
>>> The displayName API will give me only the file name not the absolute path
>>> of
>>>
>>> the file.
>>>
>>> Ex: If i have a path as /Users/user/temp.txt, only it will return
>>> temp.txt.
>>>
>>> Similarly componentsToDisplayForPath API will give me an array of
>>> NSStrings
>>>
>>> containing user, temp.txt
>>>
>>> But my requirement is to get a localized string for Complete absolute
>>> path
>>>
>>> /Users/user/temp.txt
>>>
>>
>> Did you *try* those APIs before you rejected them?
>>
>>
>>>>>
>>>>> NSFileManager.defaultManager().componentsToDisplayForPath_("/Users/mikeash/Movies")
>>>>>
>> (
>> Fear,
>> Utilisateurs,
>> mikeash,
>> "S\U00e9quences"
>> )
>>
>> That's with the current language set to French. It's PyObjC, but it's
>> all Cocoa in the end....
>
> I think his point is that the components don't have a one-to-one correlation
> to the elements of the POSIX path.
I considered that but, as you say, it makes no sense, so I figured
that couldn't possibly be it.
This is a good example of why you should put some effort into your
questions. You should describe, as much as possible, exactly what it
is your desired result is, and how that differs from what you actually
get. All Arun actually described was a requirement to localize a full
path, which is what this method does. If he needs more than that he
needs to actually say what it is that he needs.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden