Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. file:///private/var/mobile/Containers/Data/Application/C5454580-2BEB-4515-9BDE-FED85FF54F76/Documents/Inbox/ShareStrength-11.bps
  2.  
  3. let sourceFile = NSDictionary(contentsOfFile: URLString)
  4.  
  5. var error: NSError?
  6. let content = NSString(contentsOfFile: URLString, encoding:NSUTF8StringEncoding, error: &error)
  7. if content != nil
  8. {
  9. println("content: (content)")
  10. }
  11. else
  12. {
  13. println("error: (error)")
  14. }
  15.  
  16. error: Optional(Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x17eceeb0 {NSFilePath=file:///private/var/mobile/Containers/Data/Application/571DB0FF-6C5A-4BEB-9FA8-6E4DFE10E850/Documents/Inbox/ShareStrength-13.bps, NSUnderlyingError=0x17ee9810 "The operation couldn’t be completed. No such file or directory"})
  17.  
  18. let URLString: String = url.absoluteString!
  19.  
  20. let URLString: String = url.path!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement