开发者

Creating files in Objective-C

开发者 https://www.devze.com 2022-12-10 20:02 出处:网络
Which one of these 2 cases is faster in creating files? Case 1: ====== NSData *data = [Some data]; [data writeToFile:filePath atomically:YES];

Which one of these 2 cases is faster in creating files?

Case 1:
======
NSData *data = [Some data];
[data writeToFile:filePath atomically:YES];

Case 2:
=======
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager createFileAtPath:filePath  contents:da开发者_开发问答ta attributes:nil];

Thanks Biranchi.


Why are you worrying about this... Are you going to be writing data frequently.. at like 60 FPS ?.. or 60 SPS (Saves per second) :D

Use any of the above

0

精彩评论

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