This package has been deprecated

Author message:

replaced by `@seangenabe/shadow`

hardlink

1.1.2 • Public • Published

hardlink

npm Travis Build Status AppVeyor Build Status Dependency Status devDependency Status node

Glob files and create hardlinks in another directory.

Usage

const hardlink = require('hardlink')

hardlink(pattern, dest, opts)

Globs the current directory (opts.cwd || process.cwd()) and hardlinks the globbed files with the globbed folder structure into dest.

Parameters:

  • pattern - array | string - One or more glob patterns to select the files to link
  • dest - the destination directory
  • opts - options to pass to globby

Returns a promise that resolves when all files have been hardlinked.

CLI

hardlink <cwd> <dest> [pattern = **]

Use case

You might have an output directory that might contain files from a source directory. In that case, a symbolic link or junction to the source directory might be desirable. But if you want to mix and match files from other sources into the output directory, you won't be able to use those. A hardlink for each file might be useful for this case.

Related

License

MIT

Package Sidebar

Install

npm i hardlink

Weekly Downloads

1

Version

1.1.2

License

MIT

Last publish

Collaborators

  • seangenabe