• 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: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?


  • Subject: Re: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 26 Oct 2010 22:38:44 +1100

Docs say:

"Use this method if your code receives paths as C strings from system routines."


Is that the case? If you're just building this string yourself, you can do so directly using NSString methods and this method isn't needed. However, NSURL is the up-and-coming way to represent paths anyway.

--Graham


On 26/10/2010, at 10:29 PM, G S wrote:

> Hi all.  I'm giving this function what appears to be a perfectly good path:
>
> /Users/me/Library/Application Support/iPhone
> Simulator/4.2/Applications/58BD5465-FD47-49E3-83AC-242961559F48/Library/Caches/4320_th.jpg
>
> and it returns nil.  If I call UIImage's imageWithContentsOfFile with
> the same path, it works.
>
> Am I overlooking something?  I should be using this call to ensure a
> legit string, right?  Thanks!

_______________________________________________

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: 
 >What causes NSFileManager's stringWithFileSystemRepresentation to return nil? (From: G S <email@hidden>)

  • Prev by Date: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • Next by Date: Re: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • Previous by thread: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • Next by thread: Re: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • Index(es):
    • Date
    • Thread