# @mazik/fs-easy-dir-copy

> A promise based simplified Node.js directory copy recursive API

Latest version **1.0.7** (published 2026-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mazik/fs-easy-dir-copy
pnpm add @mazik/fs-easy-dir-copy
yarn add @mazik/fs-easy-dir-copy
bun add @mazik/fs-easy-dir-copy
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated.

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

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2026-09-13 |
| First published | 2020-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 0 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Md Mazedul Islam Khan |
| Maintainers | iamazik |
| Keywords | fs, file, file system, copy directory, dir |

## Links

- npm: https://www.npmjs.com/package/@mazik/fs-easy-dir-copy
- Repository: https://github.com/mazik/fs-easy-dir-copy
- npm.io page: https://npm.io/package/@mazik/fs-easy-dir-copy

## 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

- 1.0.7 (latest) — 2026-09-13
- 1.0.6 — 2020-06-07
- 1.0.5 — 2020-06-07
- 1.0.4 — 2020-06-06
- 1.0.3 — 2020-06-06
- 1.0.2 — 2020-06-06
- 1.0.1 — 2020-06-06

## README

<h1 align="center">FS Easy Dir Copy</h1>

<p align="center">A promise based simplified Node.js directory copy recursive API that also returns the list of files and directories.</p>
<p align="center">
<a href="https://github.com/mazik/fs-easy-dir-copy/actions"><img src="https://github.com/mazik/fs-easy-dir-copy/workflows/Node.js%20Package/badge.svg" alt="Build Status"></a>
<a href="https://www.npmjs.com/package/@mazik/fs-easy-dir-copy"><img src="https://img.shields.io/npm/dw/@mazik/fs-easy-dir-copy" alt="Total Downloads"></a>
<a href="https://img.shields.io/github/license/mazik/fs-easy-dir-copy"><img src="https://img.shields.io/github/license/mazik/fs-easy-dir-copy" alt="License"></a>
</p>

---------------

## Why anohter Node.js FS package for copying directories?
There are so many great packages out there based on the Node.js file system. However, recently I felt that there's nothing very simple but offers asyncrhonus operation in Node.js file system for copying directories.

In addition, I have always wanted to publish packages in NPM. This package just let me starts my journey with NPM and GitHub package registry. I also learned a lot on how the GitHub Actions works.

## Installation
This package is currently available on both NPM and GitHub package registry. You can either install it from NPM or GitHub package registry like the followings:

Install from the command line:
```shell
npm install @mazik/fs-easy-dir-copy@latest
```

## Getting started
The package `@mazik/fs-easy-dir-copy()` accepts two arguments. The first argument is a string of source path and the second argument is also a string of destination path.

You will need to import the package as you'd normally do with any other NPM package like the following:
```javascript
const copyDirectory = require('@mazik/fs-easy-dir-copy')
```

You'll need to use the `copyDirectory` using asynchronously:
```javascript
const copyDirectory = require('@mazik/fs-easy-dir-copy');

copyDirectory('./sourcePath', './destinationPath').then(items => {
    console.log(items);
}).catch(error => {
    console.log(error);
})
```
Based on your source path, the `items` variable will return an array of objects like the following:
```javascript
[
  { name: 'another', directory: true },
  { name: 'readme.md', directory: false },
  { name: 'test.md', directory: false },
]
```

## Requirements
- "node": ">=13.11.0"

## Running the tests
You'll need to simply run the following:
```shell
yarn test
```

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

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