• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: create a directory (UTF8 string) in cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create a directory (UTF8 string) in cocoa


  • Subject: Re: create a directory (UTF8 string) in cocoa
  • From: "Wayne Shao" <email@hidden>
  • Date: Wed, 21 May 2008 22:39:49 -0700

Thanks all for the responses!

On Wed, May 21, 2008 at 6:14 PM, Michael Ash <email@hidden> wrote:

> On Thu, May 22, 2008 at 8:12 AM, Wayne Shao <email@hidden> wrote:
> > I could only fine mkdir() in C. Is there anything in Cocoa?   I don't
> think
> > mkdir() can handle NSString. I need to include Chinese characters in my
> > directory name.
>
> Other have answered your primary question, I just want to address this
> last bit. The -fileSystemRepresentation method exists precisely for
> this. It gives you a C string encoded properly (using UTF-8, to be
> specific) so that the string can be passed to POSIX functions which
> expect a path. You can bet that the Cocoa solutions given will
> eventually call down to mkdir() or another similar function which also
> takes a C string. That said, if you prefer the Cocoa solution there's
> no reason not to use it, just be aware that you can easily use the C
> functions yourself as well.
>

This is very useful.   I am so used to C++/C and I am now thinking to
re-factor portion of my first app to a C++ library (except for the
nib/controller related methods).


>
> 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
>



--
Wayne Shao
_______________________________________________

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

References: 
 >create a directory (UTF8 string) in cocoa (From: "Wayne Shao" <email@hidden>)
 >Re: create a directory (UTF8 string) in cocoa (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: fundamental question: how do I call controller methods from other classes?
  • Next by Date: Re: ObjC Question - labeled arguments
  • Previous by thread: Re: create a directory (UTF8 string) in cocoa
  • Next by thread: any data on Mac OS X 10.5 install base?
  • Index(es):
    • Date
    • Thread