# gently-copy

> Copy files without overwriting

Latest version **3.2.0** (published 2019-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install gently-copy
pnpm add gently-copy
yarn add gently-copy
bun add gently-copy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2019-05-23 |
| First published | 2016-01-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dmitri Zaitsev |
| Maintainers | dmitriz |
| Keywords | copy, file, file-system, overwrite, directory, safe, graceful, gentle, inform |

## Links

- npm: https://www.npmjs.com/package/gently-copy
- Repository: https://github.com/dmitriz/gently-copy
- Homepage: https://github.com/dmitriz/gently-copy#readme
- Issues: https://github.com/dmitriz/gently-copy/issues
- npm.io page: https://npm.io/package/gently-copy

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.3

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 3.2.0 (latest) — 2019-05-23
- 3.1.0 — 2019-05-23
- 3.0.0 — 2019-05-23
- 2.3.1 — 2016-05-19
- 2.2.1 — 2016-05-19
- 2.1.2 — 2016-05-18
- 2.1.1 — 2016-05-16
- 2.0.5 — 2016-05-15
- 2.0.4 — 2016-05-15
- 2.0.3 — 2016-05-15
- 2.0.2 — 2016-05-15
- 1.2.2 — 2016-05-15
- 2.0.1 — 2016-05-15
- 1.2.1 — 2016-05-11
- 1.1.6 — 2016-05-11
- … 15 more at https://npm.io/package/gently-copy/versions

## README

# gently-copy 
Safely, colorfully and informatively copy files without overwriting

[![npm version](https://img.shields.io/npm/v/gently-copy.svg)](http://npm.im/gently-copy)
[![Build Status](https://travis-ci.org/dmitriz/gently-copy.svg?branch=master)](https://travis-ci.org/dmitriz/gently-copy) 
[![Dependency Status](https://david-dm.org/dmitriz/gently-copy.svg)](https://david-dm.org/dmitriz/gently-copy) 

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 
[![MIT License](https://img.shields.io/npm/l/gently-copy.svg?style=flat-square)](http://opensource.org/licenses/MIT) 
[![npm downloads](https://img.shields.io/npm/dm/gently-copy.svg?style=flat-square)](https://www.npmjs.com/package/gently-copy)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)


## Why?
- Copying files is sensitive operation with possible side-effects.
- Standard utilities do not sufficiently inform the user about what is going on.


## Features
- Safely copy files and directories without overwriting.
- Skip overwriting existing files, inform instead (or configure to overwrite instead with `option = {overwrite: true}`.
- Create new directories if needed.
- Clearly and colorfully inform about all actions peformed.


## Install

```sh
$ npm install --save gently-copy
```


## Usage

```js
var gentlyCopy = require('gently-copy')

var fileList = ['some-file', 'some-dir']
var dest = 'some-dest'

gentlyCopy(fileList, dest) // no overwriting (default)
gentlyCopy(fileList, dest, {overwrite: true}) // force overwriting
```

Console output with colors, thanks to the wonderful [`chalk`](https://github.com/chalk/chalk):
```sh
= Begin copying files
 - Copying file or directory: some-file
 - Copying file or directory: some-dir
= End copying files

```


## API


### gentlyCopy (source, destination, options)


#### source 

Type: `string` or (`array` of `strings`)

Single or list of file and directory name(s).


#### destination

Type: `string`

Destination directory name.


#### options (optional)

Type: `object`

To overwrite existing files, pass `option = {overwrite: true}`


## License

MIT © [Dmitri Zaitsev](https://github.com/dmitriz)

---
_Source: https://npm.io/package/gently-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
