(normalizedPath, mountPoint)
| 28 | // `path.relative()` so Windows backslash paths are handled correctly, then |
| 29 | // re-joins with forward slashes for the provider's internal POSIX format. |
| 30 | function getRelativePath(normalizedPath, mountPoint) { |
| 31 | if (normalizedPath === mountPoint) { |
| 32 | return '/'; |
| 33 | } |
| 34 | if (mountPoint === '/') { |
| 35 | return normalizedPath; |
| 36 | } |
| 37 | const rel = relative(mountPoint, normalizedPath); |
| 38 | const segments = StringPrototypeSplit(rel, sep); |
| 39 | return '/' + ArrayPrototypeJoin(segments, '/'); |
| 40 | } |
| 41 | |
| 42 | module.exports = { |
| 43 | isUnderMountPoint, |
no test coverage detected
searching dependent graphs…