开发者

Create and read a text file

I am looking 开发者_开发知识库to create a text file on my iPhone programmatically and also write some data onto the file. How can I read the text file manually?


Use NSString's initWithContentsOfFile:encoding:error: to read the file, then use stringByAppendingFormat: to add some data, and then use writeToFile:atomically:encoding:error: to write it on disk.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜