Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kevva/lnfs

Safely force create symlinks
https://github.com/kevva/lnfs

Last synced: about 2 months ago
JSON representation

Safely force create symlinks

Awesome Lists containing this project

README

        

# lnfs [![Build Status](http://img.shields.io/travis/kevva/lnfs.svg?style=flat)](https://travis-ci.org/kevva/lnfs)

> Safely force create symlinks

## Install

```
$ npm install lnfs
```

## Usage

```js
const lnfs = require('lnfs');

lnfs('foo.txt', 'bar.txt').then(() => {
console.log('Symlink successfully created!');
});
```

## API

### lnfs(src, dest, [type])

Returns a `Promise` with the path to the symlink.

#### src

Type: `string`

Path to source file.

#### dest

Type: `string`

Path to destination.

#### type

Type: `string`

Default: `file`

Can be set to `dir`, `file`, or `junction` and is only available on Windows (ignored on other platforms).

## Related

* [lnfs-cli](https://github.com/kevva/lnfs-cli) - CLI for this module

## License

MIT © [Kevin Mårtensson](https://github.com/kevva)