@as2network/file-copier
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

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

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @as2network/file-copier

Weekly Downloads

2

Version

2.2.1

License

Unlicense

Unpacked Size

42.4 kB

Total Files

16

Last publish

Collaborators

  • sambacha