summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tools/test/fmt.rs2
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts98
2 files changed, 1 insertions, 99 deletions
diff --git a/cli/tools/test/fmt.rs b/cli/tools/test/fmt.rs
index 5201bead6..733e860d2 100644
--- a/cli/tools/test/fmt.rs
+++ b/cli/tools/test/fmt.rs
@@ -338,7 +338,7 @@ pub const OP_DETAILS: phf::Map<&'static str, [&'static str; 2]> = phf_map! {
"op_fs_realpath_async" => ["resolve a path", "awaiting the result of a `Deno.realpath` call"],
"op_fs_remove_async" => ["remove a file or directory", "awaiting the result of a `Deno.remove` call"],
"op_fs_rename_async" => ["rename a file or directory", "awaiting the result of a `Deno.rename` call"],
- "op_fs_seek_async" => ["seek in a file", "awaiting the result of a `Deno.seek` or `Deno.FsFile.seek` call"],
+ "op_fs_seek_async" => ["seek in a file", "awaiting the result of a `Deno.FsFile.prototype.seek` call"],
"op_fs_stat_async" => ["get file metadata", "awaiting the result of a `Deno.stat` call"],
"op_fs_symlink_async" => ["create a symlink", "awaiting the result of a `Deno.symlink` call"],
"op_fs_truncate_async" => ["truncate a file", "awaiting the result of a `Deno.truncate` call"],
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index cc6a1d4a8..fe845bd5f 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -1920,104 +1920,6 @@ declare namespace Deno {
*/
export function createSync(path: string | URL): FsFile;
- /** Seek a resource ID (`rid`) to the given `offset` under mode given by `whence`.
- * The call resolves to the new position within the resource (bytes from the start).
- *
- * ```ts
- * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
- * using file = await Deno.open(
- * "hello.txt",
- * { read: true, write: true, truncate: true, create: true },
- * );
- * await file.write(new TextEncoder().encode("Hello world"));
- *
- * // advance cursor 6 bytes
- * const cursorPosition = await Deno.seek(file.rid, 6, Deno.SeekMode.Start);
- * console.log(cursorPosition); // 6
- * const buf = new Uint8Array(100);
- * await file.read(buf);
- * console.log(new TextDecoder().decode(buf)); // "world"
- * ```
- *
- * The seek modes work as follows:
- *
- * ```ts
- * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
- * using file = await Deno.open(
- * "hello.txt",
- * { read: true, write: true, truncate: true, create: true },
- * );
- * await file.write(new TextEncoder().encode("Hello world"));
- *
- * // Seek 6 bytes from the start of the file
- * console.log(await Deno.seek(file.rid, 6, Deno.SeekMode.Start)); // "6"
- * // Seek 2 more bytes from the current position
- * console.log(await Deno.seek(file.rid, 2, Deno.SeekMode.Current)); // "8"
- * // Seek backwards 2 bytes from the end of the file
- * console.log(await Deno.seek(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2)
- * ```
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- *
- * @category I/O
- */
- export function seek(
- rid: number,
- offset: number | bigint,
- whence: SeekMode,
- ): Promise<number>;
-
- /** Synchronously seek a resource ID (`rid`) to the given `offset` under mode
- * given by `whence`. The new position within the resource (bytes from the
- * start) is returned.
- *
- * ```ts
- * using file = Deno.openSync(
- * "hello.txt",
- * { read: true, write: true, truncate: true, create: true },
- * );
- * file.writeSync(new TextEncoder().encode("Hello world"));
- *
- * // advance cursor 6 bytes
- * const cursorPosition = Deno.seekSync(file.rid, 6, Deno.SeekMode.Start);
- * console.log(cursorPosition); // 6
- * const buf = new Uint8Array(100);
- * file.readSync(buf);
- * console.log(new TextDecoder().decode(buf)); // "world"
- * ```
- *
- * The seek modes work as follows:
- *
- * ```ts
- * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
- * using file = Deno.openSync(
- * "hello.txt",
- * { read: true, write: true, truncate: true, create: true },
- * );
- * file.writeSync(new TextEncoder().encode("Hello world"));
- *
- * // Seek 6 bytes from the start of the file
- * console.log(Deno.seekSync(file.rid, 6, Deno.SeekMode.Start)); // "6"
- * // Seek 2 more bytes from the current position
- * console.log(Deno.seekSync(file.rid, 2, Deno.SeekMode.Current)); // "8"
- * // Seek backwards 2 bytes from the end of the file
- * console.log(Deno.seekSync(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2)
- * ```
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- *
- * @category I/O
- */
- export function seekSync(
- rid: number,
- offset: number | bigint,
- whence: SeekMode,
- ): number;
-
/**
* Flushes any pending data and metadata operations of the given file stream
* to disk.