right now i am able to download remote files successfully,
but this is only if user can select one file if user select multiple file names and press download. So bef
+ (long long)getFreeSpace {
long long freeSpace = 0.0f;
NSError *error = nil;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error: &error];
if (dictionary) {
NSNumber *fileSystemFreeSizeInBytes = [dictionary objectForKey: NSFileSystemFreeSize];
freeSpace = [fileSystemFreeSizeInBytes longLongValue];
} else {
//Handle error
}
return freeSpace; }
Use this code to query the filesystem for available free space.