开发者

If NSTemporaryDirectory returns nil

开发者 https://www.devze.com 2023-03-23 20:49 出处:网络
According to the documentation, 开发者_如何学GoNSTemporaryDirectory() can return nil. I need to save some temporary files in the device. What should I do if NSTemporaryDirectory() returns nil? Should

According to the documentation, 开发者_如何学GoNSTemporaryDirectory() can return nil. I need to save some temporary files in the device. What should I do if NSTemporaryDirectory() returns nil? Should I create a folder elsewhere? If yes, where? Or should I just show a message to the user?


A potential alternate path here: http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSFileManager/URLForDirectory:inDomain:appropriateForURL:create:error:

(in the event the hashtag fails to scroll you down the page, check out -[NSFileManager URLForDirectory:inDomain:appropriateForURL:create:error:])

0

精彩评论

暂无评论...
验证码 换一张
取 消