gpt4 book ai didi

iphone - 如何确定应用程序包中是否存在文件?

转载 作者:行者123 更新时间:2023-12-03 18:11:28 26 4
gpt4 key购买 nike

抱歉,今天的第二个问题很愚蠢。是否可以确定应用程序包中是否包含文件?我可以毫无问题地访问文件,即

NSString *pathAndFileName = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"];

但不知道如何检查文件是否存在。

问候

戴夫

最佳答案

[[NSFileManager defaultManager] fileExistsAtPath:pathAndFileName];

关于iphone - 如何确定应用程序包中是否存在文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2024302/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com