• 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: FSFileManager strange behaviour on OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSFileManager strange behaviour on OS X


  • Subject: Re: FSFileManager strange behaviour on OS X
  • From: Tim Fletcher <email@hidden>
  • Date: Fri, 31 Jul 2015 21:08:19 +0100

Hi Jens,

Problem solved.
>
> Is your application sandboxed?
> But even so, I thought that NSOpen/SavePanel granted a sandboxed app permission to access the directory or file chosen by the user. (I’ve never actually used that functionality in a sandboxed app, though.)
>

No, the app isn’t sandboxed.

>
> Looks like the process running Swift playground code is sandboxed. So it can’t access files outside its sandbox, which is that ‘weird path’ you saw.
>
However, you are correct that the playground is.

The issue was just me not paying close attention. On the NSURL returned, I was requesting .absoluteString, This obviously still contains the schema part of the path (“file://“). After using the correct attribute .path things have been working.

Your questions where very useful in solving this.
Many thanks
Tim
_______________________________________________

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: 
 >FSFileManager strange behaviour on OS X (From: Tim Fletcher <email@hidden>)
 >Re: FSFileManager strange behaviour on OS X (From: Jens Alfke <email@hidden>)

  • Prev by Date: Reusable Detail View Controller for UISplitViewController?
  • Next by Date: Re: Init String with bytes
  • Previous by thread: Re: FSFileManager strange behaviour on OS X
  • Next by thread: Init String with bytes
  • Index(es):
    • Date
    • Thread