My app is caching content so that user can read it when offline.
I wrote everything of the cache into a database file (using CoreData) in iPhone.
However, the storage size is limited in iphone. So I would like to control the disk size my app is using.
How can I check the disk size I am using?
thanks
The simplest and most accurate solution is to check the size of the persistent store directly.
Use
-[NSFileManager attributesOfItemAtPath:error:]and then thefileSizekey of the returned dictionary.