Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

rm-file

1.2.0 • Public • Published

rm-file

Remove a file

  • Promise interface.
  • User-friendly errors.

Installation

npm install --save rm-file

Usage

const rmFile = require('rm-file')
 
rmFile('useless-file.txt').then(() => {
  console.log('File removed')
})

API

rmFile(path)

Returns a Promise.

rmFile.sync(path)

path

Type: string

File you want to remove.

Related

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

Keywords

none

install

npm i rm-file

Downloadsweekly downloads

16

version

1.2.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar