Get all file system tags

Since OSX Mavericks supports file tags. Is there an API for accessing the software? How can I get a list of all system tags? And manipulate them?

I already tried:

  • Class NSFileManager
  • File System Programming Guide
  • File Metadata Search Programming Guide

but none of them mention the existence of tags.

+4
source share
3 answers

You can find all the system tags in this way: ~/Library/SyncedPreferences/com.apple.finder.plist

But by default, the plist file does not exist. You can do this by adding a new tag. By the way, do you find another way to get all the system tags?

+2
source

, :

. OS X " ?

, NSURL http://goo.gl/fwHMWk, , , NSString NSURLTagNamesKey.

+1

You can read custom search settings

defaults read com.apple.Finder FavoriteTagNames  

(
    "",
    Red,
    Orange,
    Yellow,
    Green,
    Blue,
    Purple,
    Gray
)
0
source

All Articles