Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/get-symlinks
Get all symbolic link (file symlinks) using glob
https://github.com/iguntur/get-symlinks
async files filesystem glob links symbolic symlink symlinks-paths sync system
Last synced: about 12 hours ago
JSON representation
Get all symbolic link (file symlinks) using glob
- Host: GitHub
- URL: https://github.com/iguntur/get-symlinks
- Owner: iguntur
- License: mit
- Created: 2016-10-08T07:55:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T21:46:54.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T14:26:32.864Z (26 days ago)
- Topics: async, files, filesystem, glob, links, symbolic, symlink, symlinks-paths, sync, system
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# get-symlinks
[![Travis CI](https://img.shields.io/travis/iguntur/get-symlinks.svg?style=flat-square)](https://travis-ci.org/iguntur/get-symlinks)
[![node](https://img.shields.io/node/v/get-symlinks.svg?style=flat-square)](#)
[![npm](https://img.shields.io/npm/v/get-symlinks.svg?style=flat-square)](https://www.npmjs.org/package/get-symlinks)
[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](#)---
> Get all symbolic link (file symlinks) using glob
## Install
```console
$ npm install get-symlinks
```## Usage
```js
const getSymlinks = require('get-symlinks');getSymlinks(['/home/guntur/.*']).then(symlinks => {
console.log(symlinks);
});const symlinks = getSymlinks.sync(['/home/guntur/.*', '!/home/guntur/.*rc']);
console.log(symlinks);
```## API
### getSymlinks(`patterns`, `[options]`)
- Params:
- `patterns`: `` _(required)_ - See the [globby patterns](https://github.com/sindresorhus/globby#patterns).
- `options`: `` _(optional)_ - See the [globby options](https://github.com/sindresorhus/globby#options).
- Returns: `` - An array of symlinks paths.### getSymlinks.sync(`patterns`, `[options]`)
- Params:
- `patterns`: `` _(required)_ - See the [globby patterns](https://github.com/sindresorhus/globby#patterns).
- `options`: `` _(optional)_ - See the [globby options](https://github.com/sindresorhus/globby#options).
- Returns: `` - An array of symlinks paths.## Related
- [del-symlinks](https://github.com/iguntur/del-symlinks) - Delete symlinks using glob.
- [is-symbolic-link](https://github.com/iguntur/is-symbolic-link) - Check if PATH is symbolic link
- [make-symlinks](https://github.com/iguntur/make-symlinks) - Create symbolic link (symlinks) using glob.## License
MIT © [Guntur Poetra](https://github.com/iguntur)