When we open Dropbox folder, we can see icon on the left bottom of the folder.
I am developing an application in which i also want the same behavior. If folder is syncing then it will show sync icon and for other operation it will show other icon. The marked files/folder when viewed in Finder must be shown with a custom icon. But when they are selected for preview ( using spacebar) they must show their original icon ( i.e the blue icon for folder etc) .
Starting with Yosemite (10.10), there is now an officially supported (and thus Mac App Store compatible) method for displaying sync status badges in Finder icons in the form of Finder Sync extensions.
Dropbox has developed a NSPlugin for showing icon badges on each folder/file. As you would know, NSPlugins for Finder were deprecated by Apple starting with Snow Leopard. I think Dropbox worked around it with a hack - that reenabled plugin support. I don't think Apple would have liked that. Apple wants third party apps to only provide services support, since they don't want any third party code in Finder's process, but services are underwhelming.
In addition to the Finder Sync Extension mentioned in other answers, badges (and other metadata) on files can additionally be accomplished via the File Provider API:
File Provider
An extension other apps use to access files and folders managed by your app and synced with a remote storage.
https://developer.apple.com/documentation/fileprovider
Specifically, the NSFileProviderItemDecorating
class:
Badge
The system displays the badge image on top of the item’s icon. It only displays the first Badge image.
FolderBadge
Only available on folder items. The system embosses the image over the folder icon. It only displays the first FolderBadge image.
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