Skip to content

Instantly share code, notes, and snippets.

@v9n
Created August 29, 2012 20:46
Show Gist options
  • Select an option

  • Save v9n/3518714 to your computer and use it in GitHub Desktop.

Select an option

Save v9n/3518714 to your computer and use it in GitHub Desktop.
Get file attributes
NSDictionary *fileAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:filePath traverseLink:YES];
if(fileAttributes != nil)
{
NSString *fileSize = [fileAttributes objectForKey:NSFileSize];
[[cell detailTextLabel] setText:[NSString stringWithFormat:@\"%@ kb\", fileSize]];
NSLog(@\"File size: %@ kb\", fileSize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment