Class FileTag


  • public class FileTag
    extends Object
    Allows tagging and setting a label color on macOS. Color is supported for macOS >= 10.6. Tags are supported for macOS >= 10.9. Calls on Windows are silently ignored.
    Author:
    Hendrik Schreiber
    • Method Detail

      • getTagNames

        public static String[] getTagNames​(File file)
                                    throws IOException
        Returns tags.
        Requires macOS >=10.9.
        Parameters:
        file - file
        Returns:
        string array, never null
        Throws:
        IOException
      • setTagNames

        public static void setTagNames​(File file,
                                       String[] tagNames)
                                throws IOException
        Sets tags.
        Requires macOS >=10.9.
        Parameters:
        file - file
        tagNames - new tags
        Throws:
        IOException