title: How to have folders first before any file in finder (Mac) programmatically?
body: <p>I am new to Mac OS. I want to have the folders first before any other file in finder through my cocoa app.</p>
  
  <p>Can anyone suggest me a way of doing this like xtraFinder, PathFinder etc apps do?</p>
  
  <p>I have gone through the followings links. One way is this:</p>
  
  <p><a href="http://hints.macworld.com/article.php?story=2011072120153685" rel="noreferrer">http://hints.macworld.com/article.php?story=2011072120153685</a> 
  <a href="http://mygeekdaddy.net/2013/10/24/change-mavericks-finder-app-sort-order/" rel="noreferrer">http://mygeekdaddy.net/2013/10/24/change-mavericks-finder-app-sort-order/</a></p>
  
  <p>And the other way I got is to drag the folders to first in the spotlight (in system preferences) then sort by kind.</p>
  
  <p>But in both ways I don't know how to do this programmatically. Can anyone tell me step by step how to do this through my app?</p>