Yes it is possible. See the next tutorial (found using the powerful Google search engine);)
http://iphoneincubator.com/blog/device-information/how-to-obtain-total-and-available-disk-space-on-your-iphone-or-ipod-touch
Edit: added answer re: writing UIImage to a disk with unknown disk space:
Try-catch a bad way of doing something. Exceptions from cocoa relate only to truly exceptional circumstances (i.e. errors). If you are writing your image using
NSData *imageData = [myImage UIImageJPEGRepresentation];
(or UIImagePNGRview)
and then
NSError *error; BOOL success = [imageData writeToFile:(NSString *)path options:(NSDataWritingOptions)mask error:&error];
Your BOOL failed will tell you if it works, and error will contain an NSError object with a description of the error (do not check error != nil , although this may cause a failure).
source share