writeToFile:atomically: what does atomically mean?

后端 未结 2 757
悲&欢浪女
悲&欢浪女 2020-12-25 09:50

I am wondering what the atomically: parameter stands for in the writeToFile:atomically: method (-[NSArray writeToFile:atomically:] for

2条回答
  •  北海茫月
    2020-12-25 10:25

    atomically

    If YES, the data is written to a backup file, and then—assuming no errors occur—the backup file is renamed to the name specified by path; otherwise, the data is written directly to path.

提交回复
热议问题