unlink

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

unlinks a file or directory. The directory can have contents. If the path does not exist, silently does nothing. Like rm -rf (async)

Params

  1. path*-String

    The file/directory path to delete

Return

  1. -Promise

    A promise that will be resolved when the unlink is completed

Example

import { unlink } from '@blackbyte/sugar/fs';
await unlink('my/cool/file.json').then(() => {
   // do something on complete...
});

Todo

  • testsnormal