writeToFile和writeToURL有什么区别? [英] What is the difference between writeToFile and writeToURL?
问题描述
也许有人可以在这里解释这个问题,或者发给我正确的文档?
Maybe some one can explain that over here or send to me to right docs?
我已经阅读了IOS文档,但仍然无法获取,什么时候使用writeToURL方法。也许问题出在我身上,如果除我以外的其他所有人都明白这一点,但是如果有人可以帮助我,我将非常感激:-)
I've read the IOS docs, and Still can't get it, when do i use the writeToURL method. Maybe The problem is with me, if every else but me understand this, but if someone can help me with that, I would be very thankful :-)
推荐答案
区别在于writeToFile:需要一个NSString和writeToURL:需要一个NSURL。 Apple建议您使用writeToURL:。
The difference is that writeToFile: needs an NSString and writeToURL: needs an NSURL. Apple recommends you use writeToURL:.
URL可以是远程的,也可以是本地的。您可以使用+ [NSURL fileURLWithPath:]。
URLs can be both remote and local. You can use +[NSURL fileURLWithPath:].
这篇关于writeToFile和writeToURL有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!