(root: string, candidate: string)
| 197 | } |
| 198 | |
| 199 | function isWithinOrEqual(root: string, candidate: string): boolean { |
| 200 | const rel = relative(root, candidate); |
| 201 | return rel === "" || (!rel.startsWith("..") && !isAbsolute(rel)); |
| 202 | } |
| 203 | |
| 204 | function safeReadDir(dir: string): readonly Dirent[] { |
| 205 | try { |
no outgoing calls
no test coverage detected