(normalizedPath, mountPoint)
| 13 | // '/' check would never match. The trailing-separator guard handles root |
| 14 | // mount points like 'C:\' so we don't end up with 'C:\\'. |
| 15 | function isUnderMountPoint(normalizedPath, mountPoint) { |
| 16 | if (normalizedPath === mountPoint) { |
| 17 | return true; |
| 18 | } |
| 19 | if (mountPoint === '/') { |
| 20 | return StringPrototypeStartsWith(normalizedPath, '/'); |
| 21 | } |
| 22 | const prefix = mountPoint[mountPoint.length - 1] === sep ? |
| 23 | mountPoint : mountPoint + sep; |
| 24 | return StringPrototypeStartsWith(normalizedPath, prefix); |
| 25 | } |
| 26 | |
| 27 | // Returns a POSIX-style relative path the provider can consume. Uses |
| 28 | // `path.relative()` so Windows backslash paths are handled correctly, then |
no outgoing calls
no test coverage detected