开发者

Create and read a text file

开发者 https://www.devze.com 2023-03-31 13:10 出处:网络
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:e

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

精彩评论

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