title: Getting a list of files in a directory with a glob
body: <p>For some crazy reason I can't find a way to get a list of files with a glob for a given directory.</p>
  
  <p>I'm currently stuck with something along the lines of:</p>
  
  <pre><code>NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
  NSArray *dirContents = [[NSFileManager defaultManager] 
                          directoryContentsAtPath:bundleRoot];
  </code></pre>
  
  <p>..and then stripping out the stuff I don't want, which sucks.  But what I'd really like is to be able to search for something like "foo*.jpg" instead of asking for the entire directory, but I've not been able to find anything like that.</p>
  
  <p>So how the heck do you do it?</p>