(fs, absPath)
| 576 | * @returns {string} the parent directory of the absolute path |
| 577 | */ |
| 578 | const dirname = (fs, absPath) => { |
| 579 | if (fs && fs.dirname) { |
| 580 | return fs.dirname(absPath); |
| 581 | } else if (path.posix.isAbsolute(absPath)) { |
| 582 | return path.posix.dirname(absPath); |
| 583 | } else if (path.win32.isAbsolute(absPath)) { |
| 584 | return path.win32.dirname(absPath); |
| 585 | } |
| 586 | throw new Error( |
| 587 | `${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system` |
| 588 | ); |
| 589 | }; |
| 590 | |
| 591 | /** |
| 592 | * Processes the provided f. |
no outgoing calls
no test coverage detected