Skip to content

Retrieve an icon for a given file (Darwin only)

License

Notifications You must be signed in to change notification settings

vutran/mac-icons

Repository files navigation

mac-icons

Travis Coveralls branch license

Retrieve an icon for a given file (Darwin only)

Install

$ npm install --save mac-icons

Usage

const macIcons = require('mac-icons');

macIcons.getIcon().then(data => {
  console.log(data);
})

API

getIcon(filePath)

Returns a Promise with the base64 encoded string of the icon.

filePath

Type: String

The file's path.

License

MIT © Vu Tran