File size in Snow Leopard

前端 未结 4 1027
说谎
说谎 2021-02-11 08:30

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 09:02

    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.

提交回复
热议问题