Sunday, December 15, 2013

Percentage ask - how to get the size of the specified directory it?

How to get the size of the specified directory? Directory may contain subdirectories.


Reply:
Live together in the same building, etc.
Reply:
This system function can be used to call the system disk file size command, temporarily forgotten, under investigation possible;
However, this method is called above the system's application may result in efficiency;
You can get yourself a recursive directory size of all files, add up, if the directory continues recursively get all the non-directory file size, and finally add up. This is not difficult, give reference address is on file operations iphone practical code:

http://blog.csdn.net/cxsjabcabc/article/details/7167721
http://blog.csdn.net/cxsjabcabc/article/details/7167729

No comments:

Post a Comment