summaryrefslogtreecommitdiff
path: root/std/node/_fs/_fs_copy.ts
blob: 0193e77c4105d733c84b8b7dfc50bd6c16908c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.

import { CallbackWithError } from "./_fs_common.ts";

export function copyFile(
  source: string,
  destination: string,
  callback: CallbackWithError
): void {
  Deno.copyFile(source, destination)
    .then(() => callback())
    .catch(callback);
}

export function copyFileSync(source: string, destination: string): void {
  Deno.copyFileSync(source, destination);
}