title: Determine folder Size
body: <p>With this code I determine the file size if the checkbox is NSOnState, but with a folder value is always 0. The directory is correct.
  Can you help me?</p>
  
  <pre><code>unsigned long long resultsize=0;
  if(imagehistoryS.state == NSOnState) {
      NSString *path = [NSString stringWithFormat:@"Users/Giovanni/Desktop/test", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]];     
      NSNumber *fileSize = [[[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil] objectForKey:NSFileSize];
      resultsize += [fileSize doubleValue];
  }
  [result setStringValue:[NSString stringWithFormat:@"Total size items selected: %f", resultsize]];
  </code></pre>