* Rescans direct children for new entries. * @param {string} dirPath The directory path
(dirPath)
| 179 | * @param {string} dirPath The directory path |
| 180 | */ |
| 181 | #rescanChildren(dirPath) { |
| 182 | try { |
| 183 | const entries = this.#vfs.readdirSync(dirPath); |
| 184 | for (const name of entries) { |
| 185 | const fullPath = join(dirPath, name); |
| 186 | if (!this.#trackedFiles.has(fullPath)) { |
| 187 | const stats = this.#getStatsFor(fullPath); |
| 188 | this.#trackedFiles.set(fullPath, { |
| 189 | stats, |
| 190 | relativePath: name, |
| 191 | }); |
| 192 | this.emit('change', 'rename', this.#encodeFilename(name)); |
| 193 | } |
| 194 | } |
| 195 | } catch { |
| 196 | // Directory might not exist or be readable |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Recursively rescans for new entries. |
no test coverage detected