createDirectoryAtPath:attributes: alternative

心已入冬 提交于 2019-12-08 07:43:01

问题


[NSFileManager createDirectoryAtPath:attributes:] gives me a warning that it is depreciated.

What is the alternative? Or is there a better way of doing this?

Thanks

Tom


回答1:


Use createDirectoryAtPath:withIntermediateDirectories:attributes:error:

P.S.

createIntermediates If YES, then the method will also create any necessary intermediate directories; if NO, then the method fails if any parent of the directory to be created does not exist. In addition, if you pass NO for this parameter, the directory must not exist at the time this call is made.



来源:https://stackoverflow.com/questions/3880786/createdirectoryatpathattributes-alternative

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!