Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

osx-tag

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osx-tag

Manipulate file tags on macOS

  • 0.4.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by100%
Maintainers
0
Weekly downloads
 
Created
Source

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).

Keywords

FAQs

Package last updated on 05 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc