Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/lib.deno_runtime.d.ts>Deno.utimeSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.utimeSync
import { Deno } from "https://deno.land/x/deno@v0.28.0/cli/js/lib.deno_runtime.d.ts";
const { utimeSync } = Deno;

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.

  Deno.utimeSync("myfile.txt", 1556495550, new Date());

Parameters

filename: string
atime: number | Date
mtime: number | Date