mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
BREAKING(fs): remove Deno.fsync[Sync]()
(#25448)
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
parent
064a73f7a0
commit
a445ebd74f
8 changed files with 9 additions and 96 deletions
38
cli/tsc/dts/lib.deno.ns.d.ts
vendored
38
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -1785,44 +1785,6 @@ declare namespace Deno {
|
|||
*/
|
||||
export function createSync(path: string | URL): FsFile;
|
||||
|
||||
/**
|
||||
* Flushes any pending data and metadata operations of the given file stream
|
||||
* to disk.
|
||||
*
|
||||
* ```ts
|
||||
* const file = await Deno.open(
|
||||
* "my_file.txt",
|
||||
* { read: true, write: true, create: true },
|
||||
* );
|
||||
* await file.write(new TextEncoder().encode("Hello World"));
|
||||
* await file.truncate(1);
|
||||
* await Deno.fsync(file.rid);
|
||||
* console.log(await Deno.readTextFile("my_file.txt")); // H
|
||||
* ```
|
||||
*
|
||||
* @category File System
|
||||
*/
|
||||
export function fsync(rid: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Synchronously flushes any pending data and metadata operations of the given
|
||||
* file stream to disk.
|
||||
*
|
||||
* ```ts
|
||||
* const file = Deno.openSync(
|
||||
* "my_file.txt",
|
||||
* { read: true, write: true, create: true },
|
||||
* );
|
||||
* file.writeSync(new TextEncoder().encode("Hello World"));
|
||||
* file.truncateSync(1);
|
||||
* Deno.fsyncSync(file.rid);
|
||||
* console.log(Deno.readTextFileSync("my_file.txt")); // H
|
||||
* ```
|
||||
*
|
||||
* @category File System
|
||||
*/
|
||||
export function fsyncSync(rid: number): void;
|
||||
|
||||
/** The Deno abstraction for reading and writing files.
|
||||
*
|
||||
* This is the most straight forward way of handling files within Deno and is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue