copy

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

Copy a file or directory (async)

Params

  1. src*-String

    The source path to copy

  2. dest*-String

    The destination path

Return

  1. -Promise

    A promise that will be resolved when the copy is completed

Example

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