(filePath: string)
| 14 | * race on the same intermediate file or exceed filesystem name limits. |
| 15 | */ |
| 16 | export function getAtomicWriteTempPath(filePath: string): string { |
| 17 | const pidSuffix = process.pid.toString(36); |
| 18 | const timestampSuffix = Date.now().toString(36); |
| 19 | const randomSuffix = crypto.randomBytes(6).toString("hex"); |
| 20 | return `${getSiblingDirectoryPrefix(filePath)}.mux-tmp.${pidSuffix}.${timestampSuffix}.${randomSuffix}`; |
| 21 | } |
no test coverage detected