# @zhangfuxing/movedir

> Move files from one directory to another by nodejs

Latest version **1.0.2** (published 2019-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zhangfuxing/movedir
pnpm add @zhangfuxing/movedir
yarn add @zhangfuxing/movedir
bun add @zhangfuxing/movedir
```

## 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 | 1.0.2 |
| Published | 2019-11-11 |
| First published | 2019-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zhang Fu Xing |
| Maintainers | fuxingzhang |
| Keywords | move, directory, move directory, fs |

## Links

- npm: https://www.npmjs.com/package/@zhangfuxing/movedir
- Repository: https://github.com/fuxingZhang/movedir
- Homepage: https://github.com/fuxingZhang/movedir#readme
- Issues: https://github.com/fuxingZhang/movedir/issues
- npm.io page: https://npm.io/package/@zhangfuxing/movedir

## 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.2 (latest) — 2019-11-11
- 1.0.1 — 2019-11-10

## README

# movedir
move files from one directory to another by nodejs

## Install

```sh
$ npm i @zhangfuxing/movedir
```  

## Options  
```js
/**
 * move files from one directory to another
 *   - `src` source directory
 *   - `dest` destination directory
 *   - `includeSrc` Whether to include the source folder, default: false
 */
declare function movedir(src: string, dest: string, includeSrc?: boolean): Promise<void>  
```

## Useage  

### Doesn't include the source folder

```js
const movedir = require('@zhangfuxing/movedir');
const src = './test/src';
const dest = './test/dest';

(async () => {
  await movedir(src, dest);
})().catch(console.error);
```  

### Including the source folder

```js
const movedir = require('@zhangfuxing/movedir');
const src = './test/src';
const dest = './test/dest';

(async () => {
  await movedir(src, dest, true);
})().catch(console.error);
```  

## Test

```sh
$ npm test
```

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