mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 16:49:18 -05:00
FUTURE(ext/fs): remove Deno.FsWatcher.prototype.rid
(#23234)
This commit is contained in:
parent
d3f3e0d717
commit
9b34b7ed18
3 changed files with 12 additions and 0 deletions
|
@ -11,6 +11,7 @@ const {
|
|||
ObjectPrototypeIsPrototypeOf,
|
||||
PromiseResolve,
|
||||
SymbolAsyncIterator,
|
||||
ObjectDefineProperty,
|
||||
} = primordials;
|
||||
|
||||
import { SymbolDispose } from "ext:deno_web/00_infra.js";
|
||||
|
@ -20,6 +21,12 @@ class FsWatcher {
|
|||
#promise;
|
||||
|
||||
constructor(paths, options) {
|
||||
if (internals.future) {
|
||||
ObjectDefineProperty(this, "rid", {
|
||||
enumerable: false,
|
||||
value: undefined,
|
||||
});
|
||||
}
|
||||
const { recursive } = options;
|
||||
this.#rid = op_fs_events_open({ recursive, paths });
|
||||
}
|
||||
|
|
|
@ -31,6 +31,10 @@ console.log("Deno.writeAllSync is", Deno.writeAllSync);
|
|||
console.log("Deno.write is", Deno.write);
|
||||
console.log("Deno.writeSync is", Deno.writeSync);
|
||||
|
||||
const watcher = Deno.watchFs(".");
|
||||
console.log("Deno.FsWatcher.prototype.rid is", watcher.rid);
|
||||
watcher.close();
|
||||
|
||||
try {
|
||||
new Deno.FsFile(0);
|
||||
} catch (error) {
|
||||
|
|
|
@ -27,4 +27,5 @@ Deno.writeAll is undefined
|
|||
Deno.writeAllSync is undefined
|
||||
Deno.write is undefined
|
||||
Deno.writeSync is undefined
|
||||
Deno.FsWatcher.prototype.rid is undefined
|
||||
Deno.FsFile constructor is illegal
|
||||
|
|
Loading…
Reference in a new issue