diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-02-05 10:11:54 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 00:11:54 +0100 |
commit | 0f7f98795129f3f6bef51d08da9accca5e9ca9cc (patch) | |
tree | cb71c1358b9235a7f5098623750712e3de693277 /cli/tsc | |
parent | 07a94984e1e3ca24dcaf114ac5ff82c8c3510894 (diff) |
feat(unstable): `Deno.FsFile.lock[Sync]()` and `Deno.FsFile.unlock[Sync]()` (#22235)
Closes #22178.
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 7e9e4277a..8401d2302 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -2666,6 +2666,30 @@ declare namespace Deno { * @category File System */ utimeSync(atime: number | Date, mtime: number | Date): void; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Acquire an advisory file-system lock for the file. + * + * @param [exclusive=false] + */ + lock(exclusive?: boolean): Promise<void>; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Synchronously acquire an advisory file-system lock synchronously for the file. + * + * @param [exclusive=false] + */ + lockSync(exclusive?: boolean): void; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Release an advisory file-system lock for the file. + */ + unlock(): Promise<void>; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Synchronously release an advisory file-system lock for the file. + */ + unlockSync(): void; /** Close the file. Closing a file when you are finished with it is * important to avoid leaking resources. * |