Package com.tagtraum.core.osx
Class FileTag
- java.lang.Object
-
- com.tagtraum.core.osx.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileTag.TagColor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileTag.TagColor
getTagColor(File file)
Returns file color (label/tag).static String[]
getTagNames(File file)
Returns tags.static void
setTagColor(File file, FileTag.TagColor color)
Sets file color (label/tag).static void
setTagNames(File file, String[] tagNames)
Sets tags.
-
-
-
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
- filetagNames
- new tags- Throws:
IOException
-
getTagColor
public static FileTag.TagColor getTagColor(File file) throws IOException
Returns file color (label/tag).
Requires macOS >=10.6.- Parameters:
file
- file- Returns:
- color
- Throws:
IOException
-
setTagColor
public static void setTagColor(File file, FileTag.TagColor color) throws IOException
Sets file color (label/tag).
Requires macOS >=10.6.- Parameters:
file
- file- Throws:
IOException
-
-