• 沙盒路径


    // 获取沙盒Document的文件目录
    + (NSString *)getDocumentDirectory;

    // 获取沙盒Library的文件目录
    + (NSString *)getLibraryDirectory;

    // 获取沙盒Library/Caches的文件目录
    + (NSString *)getCachesDirectory;

    // 获取沙盒Preference的文件目录
    + (NSString *)getPreferencePanesDirectory;

    // 获取沙盒tmp的文件目录
    + (NSString *)getTmpDirectory;


    #pragma mark - 获取沙盒Document的文件目录
    + (NSString *)getDocumentDirectory{
        return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
    }

    #pragma mark - 获取沙盒Library的文件目录
    + (NSString *)getLibraryDirectory{
        return [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject];
    }

    #pragma mark - 获取沙盒Library/Caches的文件目录
    + (NSString *)getCachesDirectory{
        return [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
    }

    #pragma mark - 获取沙盒Preference的文件目录
    + (NSString *)getPreferencePanesDirectory{
        return [NSSearchPathForDirectoriesInDomains(NSPreferencePanesDirectory, NSUserDomainMask, YES) lastObject];
    }

    #pragma mark - 获取沙盒tmp的文件目录
    + (NSString *)getTmpDirectory{
        return
        NSTemporaryDirectory();
    }
  • 相关阅读:
    洛谷P2158 [SDOI2008]仪仗队 欧拉函数的应用
    leetcode 130. 被围绕的区域 DFS
    TediousLee CodeForces
    AccurateLee双指针+贪心+字符串
    leetcode80. 删除排序数组中的重复项 II
    CHFDORA:哆啦 A 梦
    cdq分治浅谈
    leetcode面试题64. 求1+2+…+n
    leetcode84. 柱状图中最大的矩形
    leetcode874. 模拟行走机器人
  • 原文地址:https://www.cnblogs.com/yuhaojishuboke/p/5155869.html
Copyright © 2020-2023  润新知