(filePath: string)
| 1 | import * as crypto from "crypto"; |
| 2 | |
| 3 | function getSiblingDirectoryPrefix(filePath: string): string { |
| 4 | const lastSeparatorIndex = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\")); |
| 5 | if (lastSeparatorIndex === -1) { |
| 6 | return ""; |
| 7 | } |
| 8 | |
| 9 | return filePath.slice(0, lastSeparatorIndex + 1); |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Use a short, collision-proof sibling temp path so concurrent writers never |
no outgoing calls
no test coverage detected