MCPcopy Index your code
hub / github.com/nodejs/node / #encodeFilename

Method #encodeFilename

lib/internal/vfs/watcher.js:94–99  ·  view source on GitHub ↗

* Encodes a filename according to the watcher's encoding option. * @param {string} filename The filename to encode * @returns {string|Buffer} The encoded filename

(filename)

Source from the content-addressed store, hash-verified

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.

Callers 4

#pollMethod · 0.95
#pollDirectoryMethod · 0.95
#rescanChildrenMethod · 0.95
#rescanRecursiveMethod · 0.95

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected