| 459 | if (filepath.includes("%")) { |
| 460 | filepath = filepath.replace(percentRegExp, "%25") |
| 461 | } |
| 462 | if (filepath.includes("\\")) { |
| 463 | filepath = filepath.replace(backslashRegExp, "%5C") |
| 464 | } |
| 465 | if (filepath.includes("\n")) { |
| 466 | filepath = filepath.replace(newlineRegExp, "%0A") |
| 467 | } |
| 468 | if (filepath.includes("\r")) { |
| 469 | filepath = filepath.replace(carriageReturnRegExp, "%0D") |
| 470 | } |
| 471 | if (filepath.includes("\t")) { |
| 472 | filepath = filepath.replace(tabRegExp, "%09") |
| 473 | } |
| 474 | return filepath |
| 475 | } |
| 476 | |
| 477 | const posixImpl = Path.of({ |
| 478 | [TypeId]: TypeId, |
| 479 | resolve, |
| 480 | normalize(path) { |
| 481 | if (path.length === 0) return "." |