CPU raises with attributesOfItemAtPath:error:

后端 未结 2 772
渐次进展
渐次进展 2021-01-15 14:18

I am using [NSFileManager attributesOfItemAtPath:error:] function for fetching attributes of file. But sometimes my application cpu is going upto 100%. I am usi

2条回答
  •  遥遥无期
    2021-01-15 14:56

    I am using stat.

    #import 
    
    struct stat stat1;
    if( stat([inFilePath fileSystemRepresentation], &stat1) )
          // something is wrong 
    long long size = stat1.st_size;
    printf("Size: %lld\n", stat1.st_size);
    

提交回复
热议问题