(path, name)
| 227 | const bufferSep = Buffer.from(pathModule.sep); |
| 228 | |
| 229 | function join(path, name) { |
| 230 | if ((typeof path === 'string' || isUint8Array(path)) && |
| 231 | name === undefined) { |
| 232 | return path; |
| 233 | } |
| 234 | |
| 235 | if (typeof path === 'string' && isUint8Array(name)) { |
| 236 | const pathBuffer = Buffer.from(pathModule.join(path, pathModule.sep)); |
| 237 | return Buffer.concat([pathBuffer, name]); |
| 238 | } |
| 239 | |
| 240 | if (typeof path === 'string' && typeof name === 'string') { |
| 241 | return pathModule.join(path, name); |
| 242 | } |
| 243 | |
| 244 | if (isUint8Array(path) && isUint8Array(name)) { |
| 245 | return Buffer.concat([path, bufferSep, name]); |
| 246 | } |
| 247 | |
| 248 | throw new ERR_INVALID_ARG_TYPE( |
| 249 | 'path', ['string', 'Buffer'], path); |
| 250 | } |
| 251 | |
| 252 | function getDirents(path, { 0: names, 1: types }, callback) { |
| 253 | let i; |
no test coverage detected
searching dependent graphs…