【问题标题】:Check if a file exists in the documents directory检查文件目录中是否存在文件
【发布时间】:2011-05-27 20:12:17
【问题描述】:

如何检查文档目录中是否存在特定名称的文件?

【问题讨论】:

    标签: iphone


    【解决方案1】:
    BOOL isMyFileThere = [[NSFileManager defaultManager] fileExistsAtPath:myFilePath];
    

    签入NSFileManager 文档。

    【讨论】:

      【解决方案2】:
      【解决方案3】:
      BOOL 结果 = [[NSFileManager defaultManager] fileExistsAtPath:fileLocationofDocumentDirectory]; 如果(结果==是) { NSLog(@"文件存在"); } 别的 { NSLog(@"文件不存在"); }

      【讨论】:

        猜你喜欢
        • 2013-08-02
        • 2011-09-23
        • 2013-04-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-11
        • 1970-01-01
        相关资源
        最近更新 更多