(fs, rootPath, filename)
| 557 | * @returns {string} the joined path |
| 558 | */ |
| 559 | const join = (fs, rootPath, filename) => { |
| 560 | if (fs && fs.join) { |
| 561 | return fs.join(rootPath, filename); |
| 562 | } else if (path.posix.isAbsolute(rootPath)) { |
| 563 | return path.posix.join(rootPath, filename); |
| 564 | } else if (path.win32.isAbsolute(rootPath)) { |
| 565 | return path.win32.join(rootPath, filename); |
| 566 | } |
| 567 | throw new Error( |
| 568 | `${rootPath} is neither a posix nor a windows path, and there is no class="st">'join' method defined in the file system` |
| 569 | ); |
| 570 | }; |
| 571 | |
| 572 | /** |
| 573 | * Returns the parent directory of the absolute path. |
no outgoing calls
no test coverage detected