zoukankan      html  css  js  c++  java
  • 文件的创建 判断是否存在文件 读取 写入

    //http://seven-sally.lofter.com/post/19d861_54e83e

    文件 沙盒机制 参考查看原文

    http://www.2cto.com/kf/201404/290149.html

    iOS的四种方法读取文件内容

    http://hi.baidu.com/caoruifang/item/ba101ec4603c5bc8964452bf

    ios 文件管理 获取文件属性 读取文件

    代码: 判断 本地是否有XX.txt/XX.plist等命名的文件
    -(BOOL)judgeFileExist:(NSString * )fileName
    {
        //获取文件路径
        NSArray    *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
        NSString *path=[paths        objectAtIndex:0];
        NSString *filepath=[path stringByAppendingPathComponent:fileName];
        NSFileManager *fileManager = [NSFileManager defaultManager];
       return  [fileManager fileExistsAtPath:filepath];
    //返回 YES 存在  NO不存在
    }
  • 相关阅读:
    UltraSoft
    UltraSoft
    UltraSoft
    UltraSoft
    UltraSoft
    [技术博客] 使用邮箱验证并激活账户
    OO第一单元作业总结
    OO第一单元总结
    buaaoo_second_assignment
    buaaoo_first_improvement
  • 原文地址:https://www.cnblogs.com/someonelikeyou/p/3761648.html
Copyright © 2011-2022 走看看