开发者

Write CFArray to disk

开发者 https://www.devze.com 2023-03-03 10:28 出处:网络
I have CFArray full of many CF bits and bobs. I need to writ开发者_高级运维e this to the file system for retrieval later. One way to do this would be to run through the array and recast the contents t

I have CFArray full of many CF bits and bobs. I need to writ开发者_高级运维e this to the file system for retrieval later. One way to do this would be to run through the array and recast the contents to their NSCoding compliant counterparts, but this would take quite some time, and I don't really need to do anything with the data other than save it.

Is there a way to write out the CFArray to a file that does not require the above?

Cheers,

Rich


No — there's no free lunch here; to serialize an array, you have to be able to write out everything that's in it, and that means that everything has to implement NSCoding.

0

精彩评论

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