【发布时间】:2026-01-05 15:05:03
【问题描述】:
[NSFileManager createDirectoryAtPath:attributes:] 警告我它已被贬值。
有什么选择?或者有更好的方法吗?
谢谢
汤姆
【问题讨论】:
标签: iphone directory nsfilemanager
[NSFileManager createDirectoryAtPath:attributes:] 警告我它已被贬值。
有什么选择?或者有更好的方法吗?
谢谢
汤姆
【问题讨论】:
标签: iphone directory nsfilemanager
使用createDirectoryAtPath:withIntermediateDirectories:attributes:error:
附言
createIntermediates 如果是,那么 方法还将创建任何必要的 中间目录;如果否,则 如果 要创建的目录不 存在。此外,如果您通过 NO 这个参数,目录一定不能 在进行此调用时存在。
【讨论】:
withIntermediateDirectories 你能传递nil吗?它有什么作用?
createDirectoryatURL:withIntermediateDirectories:attributes:error:。 Apple 越来越多地推动开发人员使用 URL 而不是字符串来引用文件系统中的内容。