rm-file
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i rm-file

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

4.87 kB

Total Files

6

Last publish

Collaborators

  • linusu