I am new to Mac OS. I want to have the folders first before any other file in finder through my cocoa app.
Can anyone suggest me a way of doing this like xtraFinder, PathFinder etc apps do?
I have gone through the followings links. One way is this:
http://hints.macworld.com/article.php?story=2011072120153685 http://mygeekdaddy.net/2013/10/24/change-mavericks-finder-app-sort-order/
And the other way I got is to drag the folders to first in the spotlight (in system preferences) then sort by kind.
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?
On your Mac, click the Finder icon in the Dock to open a Finder window. Do any of the following: Sort items: In any view, choose View > Show View Options, click the Sort By pop-up menu, then choose the sort order, such as Date Modified or Name.
1. Click on the View menu in Finder and select Clean up to make all icons align properly. 2. If you want your desktop icons to be auto-arranged, you can do so by clicking on the View menu and then hold on the ALT key on the keyboard until you see the "Keep Arranged By" option show up on the View menu.
Click the desktop, choose View > Sort By, then choose an option. If you want to control the placement of your files on the desktop, keep Sort By set to none. You can still arrange files neatly when desired—just click the desktop, choose View > Clean Up By, then choose how you'd like to arrange the files.
in the Finder window click the sort bar at the top again and the content will reverse sorting.
OS X Sierra finally has an option for this:
Now, When you sort by name, can see folders at top of files (like as windows)
Good Luck ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With