title: Getting file size with NSFileManager
body: <p>I need to get size of video file with NSFileManager. I can retrieve URL path of my file. I found Objective-C code which seems working but my project is developed with Swift. How can I write the following code with Swift?</p>
  
  <pre><code>NSURL *videoUrl=(NSURL*)[info objectForKey:UIImagePickerControllerMediaURL];
  
  //Error Container
  NSError *attributesError;
  NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[videoUrl path] error:&amp;attributesError];
  NSNumber *fileSizeNumber = [fileAttributes objectForKey:NSFileSize];
  long long fileSize = [fileSizeNumber longLongValue];
  </code></pre>