diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-10-25 14:03:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 14:03:05 -0400 |
commit | ffff814540394a6a958897b38f4944954773cf74 (patch) | |
tree | 7797f0d55fc7d7db7295932ee7a2a252e546099e /cli/dts/lib.deno.ns.d.ts | |
parent | 3f22f912ec4996fecb05ba6d5baa1a02bdffe78e (diff) |
feat: stabilize Deno.futime() and Deno.futimeSync() (#16415)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index ed6e8ad4f..86be40c67 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -3963,6 +3963,42 @@ declare namespace Deno { export function ftruncate(rid: number, len?: number): Promise<void>; /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file stream resource referenced by `rid`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = Deno.openSync("file.txt", { create: true, write: true }); + * Deno.futimeSync(file.rid, 1556495550, new Date()); + * ``` + * + * @category File System + */ + export function futimeSync( + rid: number, + atime: number | Date, + mtime: number | Date, + ): void; + + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * stream resource referenced by `rid`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = await Deno.open("file.txt", { create: true, write: true }); + * await Deno.futime(file.rid, 1556495550, new Date()); + * ``` + * + * @category File System + */ + export function futime( + rid: number, + atime: number | Date, + mtime: number | Date, + ): Promise<void>; + + /** * Synchronously returns a `Deno.FileInfo` for the given file stream. * * ```ts |