(filename)
| 220 | } |
| 221 | |
| 222 | [kFSWatchStart](filename) { |
| 223 | filename = pathResolve(getValidatedPath(filename)); |
| 224 | |
| 225 | try { |
| 226 | const file = lazyLoadFsSync().statSync(filename); |
| 227 | |
| 228 | this.#rootPath = filename; |
| 229 | this.#closed = false; |
| 230 | this.#watchingFile = file.isFile(); |
| 231 | |
| 232 | this.#watchFile(filename); |
| 233 | if (file.isDirectory()) { |
| 234 | this.#watchFolder(filename); |
| 235 | } |
| 236 | } catch (error) { |
| 237 | if (!this.#options.throwIfNoEntry && error.code === 'ENOENT') { |
| 238 | error.filename = filename; |
| 239 | throw error; |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | } |
| 244 | |
| 245 | ref() { |
| 246 | this.#files.forEach((file) => { |
nothing calls this directly
no test coverage detected