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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    21
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    21
  • 1.2.0
    0
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i rm-file

Weekly Downloads

21

Version

2.0.0

License

MIT

Unpacked Size

4.87 kB

Total Files

6

Last publish

Collaborators

  • linusu