Filesystem.rmrfSync()

Completely remove a file or directory (like rm -rf).

If the provided path is a directory, all contents will be removed recursively. If nothing exists at the provided path, the success exit will be triggered, but nothing will be deleted.

Usage

Hover over inputs/exits for more info.

var Filesystem = require('machinepack-fs');


// Completely remove a file or directory (like rm -rf).

Filesystem.rmrfSync({

path: '/Users/mikermcneil/.tmp/foo',

}).execSync();

Inputs

path required

The absolute path to the file or directory to remove.

'/Users/mikermcneil/.tmp/foo'

Exits

error

An unexpected error occurred.

success

OK.