brave/node-alias

Name: node-alias

Owner: Brave Software

Description: Mac OS aliases creation and reading from node.js

Forked from: LinusU/node-alias

Created: 2016-07-28 23:01:46.0

Updated: 2016-07-28 23:01:47.0

Pushed: 2016-07-28 23:03:22.0

Homepage: null

Size: 27

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

node-alias

Mac OS aliases creation and reading from node.js

Attention

This library does currently not handle the book\0\0\0\0mark\0\0\0\0-header. It only does manipulation on the raw alias data.

I intend to add something like alias.write(buf, path) and alias.read(path).

Installation
install macos-alias
Usage
alias = require('macos-alias');
API
alias.create(target)

Create a new alias pointing to target, returns a buffer.

(This function performs blocking fs interaction)

alias.decode(buf)

Decodes buffer buf and returns an object with info about the alias.

alias.encode(info)

Encodes the info-object into an alias, returns a buffer.

alias.isAlias(path)

Check if the file at path is an alias, returns a boolean.

(This function performs blocking fs interaction)

Hacking

Clone the repo and start making changes, run node-gyp to build the project.

-gyp rebuild
Tests
a

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.