summaryrefslogtreecommitdiff
path: root/cli/js/utime.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/utime.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/utime.ts')
-rw-r--r--cli/js/utime.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/utime.ts b/cli/js/utime.ts
index c96461b2c..d80b8b396 100644
--- a/cli/js/utime.ts
+++ b/cli/js/utime.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "./dispatch_json.ts";
-import { OP_UTIME } from "./dispatch.ts";
function toSecondsFromEpoch(v: number | Date): number {
return v instanceof Date ? v.valueOf() / 1000 : v;
@@ -17,7 +16,7 @@ export function utimeSync(
atime: number | Date,
mtime: number | Date
): void {
- sendSync(OP_UTIME, {
+ sendSync("op_utime", {
filename,
// TODO(ry) split atime, mtime into [seconds, nanoseconds] tuple
atime: toSecondsFromEpoch(atime),
@@ -36,7 +35,7 @@ export async function utime(
atime: number | Date,
mtime: number | Date
): Promise<void> {
- await sendAsync(OP_UTIME, {
+ await sendAsync("op_utime", {
filename,
// TODO(ry) split atime, mtime into [seconds, nanoseconds] tuple
atime: toSecondsFromEpoch(atime),