Lines Matching full:path
18 const { resolve, dirname } = require('path');
48 #isPathWatched(path) {
49 if (this.#watchers.has(path)) {
54 if (watcher.recursive && StringPrototypeStartsWith(path, watchedPath)) {
62 #removeWatchedChildren(path) {
64 if (path !== watchedPath && StringPrototypeStartsWith(watchedPath, path)) {
95 watchPath(path, recursive = true) {
96 if (this.#isPathWatched(path)) {
99 const watcher = watch(path, { recursive, signal: this.#signal });
101 .#onChange(recursive ? resolve(path, fileName) : path));
102 this.#watchers.set(path, { handle: watcher, recursive });
104 this.#removeWatchedChildren(path);