diff options
Diffstat (limited to 'cli/js/utime.ts')
-rw-r--r-- | cli/js/utime.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/js/utime.ts b/cli/js/utime.ts index 102e5f359..2026e60bf 100644 --- a/cli/js/utime.ts +++ b/cli/js/utime.ts @@ -8,19 +8,19 @@ function toSecondsFromEpoch(v: number | Date): number { /** **UNSTABLE**: needs investigation into high precision time. * * Synchronously changes the access and modification times of a file system - * object referenced by `filename`. Given times are either in seconds - * (Unix epoch time) or as `Date` objects. + * object referenced by `path`. Given times are either in seconds (UNIX epoch + * time) or as `Date` objects. * * Deno.utimeSync("myfile.txt", 1556495550, new Date()); * * Requires `allow-write` permission. */ export function utimeSync( - filename: string, + path: string, atime: number | Date, mtime: number | Date ): void { sendSync("op_utime", { - filename, + path, // TODO(ry) split atime, mtime into [seconds, nanoseconds] tuple atime: toSecondsFromEpoch(atime), mtime: toSecondsFromEpoch(mtime) @@ -30,19 +30,19 @@ export function utimeSync( /** **UNSTABLE**: needs investigation into high precision time. * * Changes the access and modification times of a file system object - * referenced by `filename`. Given times are either in seconds - * (Unix epoch time) or as `Date` objects. + * referenced by `path`. Given times are either in seconds (UNIX epoch time) + * or as `Date` objects. * * await Deno.utime("myfile.txt", 1556495550, new Date()); * * Requires `allow-write` permission. */ export async function utime( - filename: string, + path: string, atime: number | Date, mtime: number | Date ): Promise<void> { await sendAsync("op_utime", { - filename, + path, // TODO(ry) split atime, mtime into [seconds, nanoseconds] tuple atime: toSecondsFromEpoch(atime), mtime: toSecondsFromEpoch(mtime) |