Socket
Socket
Sign inDemoInstall

@as2network/file-copier

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @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.


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
41.4 kB
Created
Weekly downloads
 

Readme

Source

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)

FAQs

Last updated on 12 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc