title: Empty Trash Bin via Objective-C/Cocoa
body: <p>I was wondering if there is a way to programmatically empty the contents of the trash bin. I'm currently deleting files that are located there using:</p>
  
  <pre><code>    NSFileManager *manager = [NSFileManager defaultManager];
      [manager removeItemAtPath:fileToDelete error:nil];
  </code></pre>
  
  <p>However, after I use this operation, every time I drag a file to the trash, I am prompted with the message:</p>
  
  <blockquote>
    <p>Are you sure you want to delete
    “xxxxxx.xxx”?This item will be deleted
    immediately. You can’t undo this
    action.</p>
  </blockquote>
  
  <p>This lasts until I either log out or sudo rm -rf the trash bin. </p>
  
  <p>Thanks!</p>