2.0.0 • Published 3 years ago

rm-file v2.0.0

Weekly downloads
39
License
MIT
Repository
github
Last release
3 years ago

rm-file

Remove a file

  • Promise interface.
  • User-friendly errors.

Installation

npm install --save rm-file

Usage

import { rmFile } from 'rm-file'

await rmFile('useless-file.txt')

Sync

import { rmFileSync } from 'rm-file'

rmFileSync('useless-file.txt')

API

rmFile(path)

  • path (string | Buffer | URL, required)
  • returns Promise<void>

rmFileSync(path)

  • path (string | Buffer | URL, required)

Related

  • cp-file - Copy a single file
  • make-dir - Make a directory and its parents if needed