title: Iphone get free space
body: <p>I am using this method to get the device free space(found it in web):</p>
  
  <pre><code>-(float)getFreeSpace{  
  float freeSpace = 0.0f;  
  NSError *error = nil;  
  NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:kSongsFolder error: &amp;error];  
  
  if (dictionary) {  
      NSNumber *fileSystemFreeSizeInBytes = [dictionary objectForKey: NSFileSystemFreeSize];  
      NSLog(@"%d",fileSystemFreeSizeInBytes);
      freeSpace = [fileSystemFreeSizeInBytes floatValue];  
  } else { 
      //Handle error
  }  
  return freeSpace/1024; 
  </code></pre>
  
  <p>}</p>
  
  <p>now i get from this method 8687616.0 and when i check in the device properties i have a 8.1 GB free.</p>
  
  <p>how can i get the free space in MB? and did this method good,because there is a different between them.</p>