(result, options)
| 3197 | } |
| 3198 | |
| 3199 | function encodeRealpathResult(result, options) { |
| 3200 | if (!options || !options.encoding || options.encoding === 'utf8') |
| 3201 | return result; |
| 3202 | const asBuffer = Buffer.from(result); |
| 3203 | if (options.encoding === 'buffer') { |
| 3204 | return asBuffer; |
| 3205 | } |
| 3206 | return asBuffer.toString(options.encoding); |
| 3207 | } |
| 3208 | |
| 3209 | // Finds the next portion of a (partial) path, up to the next path delimiter |
| 3210 | let nextPart; |
no test coverage detected
searching dependent graphs…