summaryrefslogtreecommitdiff
path: root/cli/tsc
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-25 03:26:49 +1100
committerGitHub <noreply@github.com>2024-01-24 17:26:49 +0100
commitf5097d9d3b62f7dc8e29e85e12f6a6f2858addbf (patch)
tree63a828e08571bf8bbde3e341e48392c91bf645fe /cli/tsc
parent6b5c9764ac8087d035ef6a3f2542bd089957035e (diff)
feat: `Deno.FsFile.{utime,utimeSync}()` and deprecate `Deno.{futime,futimeSync}` (#22070)
For removal in Deno v2. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tsc')
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts32
1 files changed, 32 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index ff37abb84..175276b66 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -2632,6 +2632,32 @@ declare namespace Deno {
* @category I/O
*/
dataSyncSync(): void;
+ /**
+ * Changes the access (`atime`) and modification (`mtime`) times of the
+ * file stream resource. Given times are either in seconds (UNIX epoch
+ * time) or as `Date` objects.
+ *
+ * ```ts
+ * using file = await Deno.open("file.txt", { create: true, write: true });
+ * await file.utime(1556495550, new Date());
+ * ```
+ *
+ * @category File System
+ */
+ utime(atime: number | Date, mtime: number | Date): Promise<void>;
+ /**
+ * Synchronously changes the access (`atime`) and modification (`mtime`)
+ * times of the file stream resource. Given times are either in seconds
+ * (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * using file = Deno.openSync("file.txt", { create: true, write: true });
+ * file.utime(1556495550, new Date());
+ * ```
+ *
+ * @category File System
+ */
+ utimeSync(atime: number | Date, mtime: number | Date): void;
/** Close the file. Closing a file when you are finished with it is
* important to avoid leaking resources.
*
@@ -5379,6 +5405,9 @@ declare namespace Deno {
* Deno.futimeSync(file.rid, 1556495550, new Date());
* ```
*
+ * @deprecated Use {@linkcode Deno.FsFile.utimeSync} instead.
+ * {@linkcode Deno.futimeSync} will be removed in Deno 2.0.
+ *
* @category File System
*/
export function futimeSync(
@@ -5397,6 +5426,9 @@ declare namespace Deno {
* await Deno.futime(file.rid, 1556495550, new Date());
* ```
*
+ * @deprecated Use {@linkcode Deno.FsFile.utime} instead.
+ * {@linkcode Deno.futime} will be removed in Deno 2.0.
+ *
* @category File System
*/
export function futime(