# @as2network/file-copier

> Watches a directory and ensures all files matching a predicate function are mirrored to another directory (recursively), and deletes the files from the mirror when they are deleted from the source.

Latest version **2.2.1** (published 2020-11-12) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install @as2network/file-copier
pnpm add @as2network/file-copier
yarn add @as2network/file-copier
bun add @as2network/file-copier
```

## 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 | 2.2.1 |
| Published | 2020-11-12 |
| First published | 2020-11-12 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 41.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | sambacha |

## Links

- npm: https://www.npmjs.com/package/@as2network/file-copier
- Repository: https://github.com/as2network/lib/master/packages/file-copier
- npm.io page: https://npm.io/package/@as2network/file-copier

## Recent versions

- 2.2.1 (latest) — 2020-11-12

## README

# `File Copier`

## Overview 

Watches a directory and ensures all files matching a predicate function are mirrored to another directory (recursively).
Then deletes the files from the mirror when they are deleted from the source.

## Usage

```typescript
import { FileCopier } from '@zoltu/file-copier'
import * as path from 'path'
const inputDirectoryPath = path.join(__dirname, 'source')
const outputDirectoryPath = path.join(__dirname, 'output')
const filterFunction = (filePath: string) => !filePath.endsWith('.md')

new FileCopier(inputDirectoryPath, outputDirectoryPath, filterFunction)
```

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