Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jim93

macrumors newbie
Original poster
Jun 27, 2009
16
0
Does anyone know if there is some way to find out the current size of the folder your application is in to display to the end-user? (Assume this has to done through a programmed method since folder size is not static)
 
I would imagine this wouldn't work because of permission issues on the iPhone (?).
 
That looks like it should work at least for my app not sure if it will work to find out space left for apps. I know the permissions are not for writing but are there read permissions outside of your apps sandboxed space.
 
I haven't monkeyed around with files outside the app sandbox so I don't know what the permissions are for those files. You'll have to try it yourself. Having said that, I'm pretty sure that Apple won't allow an app on the app store that displays info from parts of the file system outside the app's sandbox.

The restrictions to the sandbox are more than just unix file permissions, I think. There is a mobileuser user and root. There are probably some other user accounts but they are all some form of root or not mobileuser. Normally a user could see all the files that are owned by that user. So under a standard unix file system set up when an app is running it should be able to inspect other folders than its own, but this doesn't work. So the file system has other restrictions besides the standard unix file permissions restrictions, I think.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.