0.4.10 • Published 7 months ago

osx-tag v0.4.10

Weekly downloads
3
License
MIT
Repository
github
Last release
7 months ago

osx-tag Action Status npm

A node.js package to manipulate tags associated with files on macOS.

Quick Start

$ npm install osx-tag

Simple example:

var tag = require('osx-tag');
var path = 'foo.txt';

tag.getTags(path, function(err, tags) {
    if (err) throw err;
    console.log(tags);
    tag.addTags(path, ['Important', 'Photo'], function(err) {
        if (err) throw err;
    });
});

API

See test/test.js for usage.

getTags(path, callback)

  • path - Path of the file/directory to retrieve associated tags.
  • callback - This callback function is called with two arguments (err, tags) where tags is an array of tags.

setTags(path, tags, callback)

  • path - Path of the file/directory to set tags.
  • tags - Array of tags to assign.
  • callback - This callback is called with one argument (err).

addTags(path, tags, callback)

  • path - Path of the file/directory to add tags.
  • tags - Array of tags to add.
  • callback - This callback is called with one argument (err).

removeTags(path, tags, callback)

  • path - Path of the file/directory to remove tags.
  • tags - Array of tags to remove.
  • callback - This callback is called with one argument (err).
0.4.10

7 months ago

0.4.9

11 months ago

0.4.8

2 years ago

0.4.7

2 years ago

0.4.6

3 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

8 years ago

0.2.0

11 years ago

0.1.0

12 years ago