* Encodes a filename according to the watcher's encoding option. * @param {string} filename The filename to encode * @returns {string|Buffer} The encoded filename
(filename)
| 92 | * @returns {string|Buffer} The encoded filename |
| 93 | */ |
| 94 | #encodeFilename(filename) { |
| 95 | if (this.#encoding === 'buffer') { |
| 96 | return Buffer.from(filename); |
| 97 | } |
| 98 | return filename; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Gets stats for the watched path. |
no test coverage detected