summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-09-01 02:29:43 +0800
committerGitHub <noreply@github.com>2020-08-31 14:29:43 -0400
commit32de714dc72ad865a625d417cf7af95dbc31b798 (patch)
treea1e74c4c4d9fe32519598fa788f3f4ac496c61a4 /cli/dts/lib.deno.unstable.d.ts
parentc82c3b982edfaade0b64119bb00183966b8ab749 (diff)
feat(unstable): add Deno.futime and Deno.futimeSync (#7266)
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 14079f300..9c5590f97 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -1247,6 +1247,40 @@ declare namespace Deno {
export function createHttpClient(
options: CreateHttpClientOptions,
): HttpClient;
+
+ /** **UNSTABLE**: needs investigation into high precision time.
+ *
+ * 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 });
+ * Deno.futimeSync(file.rid, 1556495550, new Date());
+ * ```
+ */
+ export function futimeSync(
+ rid: number,
+ atime: number | Date,
+ mtime: number | Date,
+ ): void;
+
+ /** **UNSTABLE**: needs investigation into high precision time.
+ *
+ * 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 });
+ * await Deno.futime(file.rid, 1556495550, new Date());
+ * ```
+ */
+ export function futime(
+ rid: number,
+ atime: number | Date,
+ mtime: number | Date,
+ ): Promise<void>;
}
declare function fetch(