diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_cp.js')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_cp.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/node/polyfills/_fs/_fs_cp.js b/ext/node/polyfills/_fs/_fs_cp.js index 245e3c76b..283b4f542 100644 --- a/ext/node/polyfills/_fs/_fs_cp.js +++ b/ext/node/polyfills/_fs/_fs_cp.js @@ -2,22 +2,24 @@ // deno-lint-ignore-file prefer-primordials +import { core } from "ext:core/mod.js"; +const { + op_node_cp, + op_node_cp_sync, +} = core.ensureFastOps(); + import { getValidatedPath, validateCpOptions, } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; -const core = globalThis.__bootstrap.core; -const ops = core.ops; -const { op_node_cp } = core.ensureFastOps(); - export function cpSync(src, dest, options) { validateCpOptions(options); const srcPath = getValidatedPath(src, "src"); const destPath = getValidatedPath(dest, "dest"); - ops.op_node_cp_sync(srcPath, destPath); + op_node_cp_sync(srcPath, destPath); } export function cp(src, dest, options, callback) { |