When we open the Dropbox folder, we can see the icon at the bottom left of the folder.

I am developing an application in which I also want to have the same behavior. If the folder is synchronized, a synchronization icon will be displayed in it, and for another operation, a different icon will be displayed. Marked files / folders when viewed in Finder should be displayed using a custom icon. But when they are selected for preview (using a space), they should show their original icon (for example, a blue icon for a folder, etc.).

Can anyone help me out? Thanks:)
source share