diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/diagnostics.rs | 2 | ||||
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 40 | ||||
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 44 |
3 files changed, 40 insertions, 46 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index 94af49b87..0fa35839e 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -49,8 +49,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "startTls", "systemMemoryInfo", "umask", - "utime", - "utimeSync", "spawnChild", "Child", "spawn", diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 86be40c67..0ac06dc62 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -4026,6 +4026,46 @@ declare namespace Deno { */ export function fstat(rid: number): Promise<FileInfo>; + /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file system object referenced by `path`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * Deno.utimeSync("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utimeSync( + path: string | URL, + atime: number | Date, + mtime: number | Date, + ): void; + + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * system object referenced by `path`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * await Deno.utime("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utime( + path: string | URL, + atime: number | Date, + mtime: number | Date, + ): Promise<void>; + /** @category HTTP Server */ export interface RequestEvent { readonly request: Request; diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 1b26cdd33..c687848ca 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -844,50 +844,6 @@ declare namespace Deno { symbols: S, ): DynamicLibrary<S>; - /** **UNSTABLE**: needs investigation into high precision time. - * - * Synchronously changes the access (`atime`) and modification (`mtime`) times - * of a file system object referenced by `path`. Given times are either in - * seconds (UNIX epoch time) or as `Date` objects. - * - * ```ts - * Deno.utimeSync("myfile.txt", 1556495550, new Date()); - * ``` - * - * Requires `allow-write` permission. - * Needs investigation into high precision time. - * - * @tags allow-write - * @category File System - */ - export function utimeSync( - path: string | URL, - atime: number | Date, - mtime: number | Date, - ): void; - - /** **UNSTABLE**: New API, yet to be vetted. - * - * Changes the access (`atime`) and modification (`mtime`) times of a file - * system object referenced by `path`. Given times are either in seconds - * (UNIX epoch time) or as `Date` objects. - * - * ```ts - * await Deno.utime("myfile.txt", 1556495550, new Date()); - * ``` - * - * Requires `allow-write` permission. - * Needs investigation into high precision time. - * - * @tags allow-write - * @category File System - */ - export function utime( - path: string | URL, - atime: number | Date, - mtime: number | Date, - ): Promise<void>; - /** **UNSTABLE**: New API, yet to be vetted. * * @category Sub Process |