Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/kevva/lnfs
- Owner: kevva
- License: mit
- Created: 2014-10-13T16:48:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-23T22:56:03.000Z (over 7 years ago)
- Last Synced: 2024-10-12T01:06:39.741Z (2 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 14
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-nodejs-cn - lnfs - 像 ```ln -fs``` 一样,强制创建符号链接 (包 / 文件系统)
- awesome-nodejs - lnfs - Force create symlinks like `ln -fs`. ![](https://img.shields.io/github/stars/kevva/lnfs.svg?style=social&label=Star) (Repository / Filesystem)
- awesome-nodejs - lnfs - Safely force create symlinks - ★ 9 (Filesystem)
- awesome-node - lnfs - Force create symlinks like `ln -fs`. (Packages / Filesystem)
- awesome-nodejs-cn - lnfs - 像`ln -fs`一样,强制创建符号链接. (目录 / 文件系统)
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)