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

    Keywords

    none

    Install

    npm i rm-file

    DownloadsWeekly Downloads

    11

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    4.87 kB

    Total Files

    6

    Last publish

    Collaborators

    • linusu