zoukankan      html  css  js  c++  java
  • 本地文件

    本地文件

    -(NSMutableDictionary *)localFile {
        NSString *path = [[NSBundle mainBundle] bundlePath];
        NSFileManager *fm = [NSFileManager defaultManager];
        NSDirectoryEnumerator *dirEnum = [fm enumeratorAtPath:path];
        NSString *fileName;
        NSMutableDictionary *R = [NSMutableDictionary dictionary];
        while (fileName = [dirEnum nextObject]) {
            NSLog(@"短路径:%@", fileName);
            NSLog(@"全路径:%@", [path stringByAppendingPathComponent:fileName]);
            if ([fileName hasSuffix:@".png"]) {
                NSString *key = [fileName componentsSeparatedByString:@"/"].lastObject;
                [R setObject:fileName forKey:key];
            }
        }
        return R;
    }
  • 相关阅读:
    day09
    day8
    day 7
    day 6
    PYTHON 学习
    day 5 作业
    day04作业
    Day03作业及默写
    python 2020 day4
    (copy)python操作excel
  • 原文地址:https://www.cnblogs.com/OIMM/p/9844921.html
Copyright © 2011-2022 走看看