File size in Snow Leopard

前端 未结 4 1005
[愿得一人]
[愿得一人] 2021-02-11 08:16

I\'m trying to figure out how to convert a file\'s (or directory\'s) byte size into kilobytes, megabytes, gigabytes, etc... respectively according the file\'s or directory\'s si

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-11 08:41

    You're probably not measuring a resource fork. You'll need to use the Core Services File Manager both to iterate the directories and to measure the sizes of files. Unlike NSFileManager, the File Manager will tell you the size of the resource fork.

提交回复
热议问题