summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/diagnostics.rs2
-rw-r--r--cli/dts/lib.deno.ns.d.ts36
-rw-r--r--cli/dts/lib.deno.unstable.d.ts42
-rw-r--r--runtime/js/90_deno_ns.js4
-rw-r--r--runtime/ops/fs.rs2
5 files changed, 38 insertions, 48 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs
index 4e456b444..94af49b87 100644
--- a/cli/diagnostics.rs
+++ b/cli/diagnostics.rs
@@ -37,8 +37,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
"connect",
"consoleSize",
"createHttpClient",
- "futime",
- "futimeSync",
"kill",
"listen",
"listenDatagram",
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
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 1085c7039..1b26cdd33 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -982,48 +982,6 @@ declare namespace Deno {
/** **UNSTABLE**: New API, yet to be vetted.
*
- * 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());
- * ```
- *
- * Needs investigation into high precision time.
- *
- * @category File System
- */
- export function futimeSync(
- rid: number,
- 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
- * 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());
- * ```
- *
- * Needs investigation into high precision time.
- *
- * @category File System
- */
- export function futime(
- rid: number,
- atime: number | Date,
- mtime: number | Date,
- ): Promise<void>;
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
* A generic transport listener for message-oriented protocols.
*
* @category Network
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index b4440d2ac..b9e361ae4 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -55,6 +55,8 @@
truncate: __bootstrap.fs.truncate,
ftruncateSync: __bootstrap.fs.ftruncateSync,
ftruncate: __bootstrap.fs.ftruncate,
+ futime: __bootstrap.fs.futime,
+ futimeSync: __bootstrap.fs.futimeSync,
errors: __bootstrap.errors.errors,
// TODO(kt3k): Remove this export at v2
// See https://github.com/denoland/deno/issues/9294
@@ -128,8 +130,6 @@
getUid: __bootstrap.os.getUid,
listenDatagram: __bootstrap.net.listenDatagram,
umask: __bootstrap.fs.umask,
- futime: __bootstrap.fs.futime,
- futimeSync: __bootstrap.fs.futimeSync,
utime: __bootstrap.fs.utime,
utimeSync: __bootstrap.fs.utimeSync,
HttpClient: __bootstrap.fetch.HttpClient,
diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs
index 9b0737fe9..f2ee9af9e 100644
--- a/runtime/ops/fs.rs
+++ b/runtime/ops/fs.rs
@@ -1916,7 +1916,6 @@ fn op_futime_sync(
mtime_secs: i64,
mtime_nanos: u32,
) -> Result<(), AnyError> {
- super::check_unstable(state, "Deno.futimeSync");
let atime = filetime::FileTime::from_unix_time(atime_secs, atime_nanos);
let mtime = filetime::FileTime::from_unix_time(mtime_secs, mtime_nanos);
@@ -1937,7 +1936,6 @@ async fn op_futime_async(
mtime_secs: i64,
mtime_nanos: u32,
) -> Result<(), AnyError> {
- super::check_unstable2(&state, "Deno.futime");
let atime = filetime::FileTime::from_unix_time(atime_secs, atime_nanos);
let mtime = filetime::FileTime::from_unix_time(mtime_secs, mtime_nanos);