| 2337 | } |
| 2338 | |
| 2339 | BFP_EXPORT void BFP_CALLTYPE BfpFile_GetTempFileName(char* outName, int* inOutNameSize, BfpFileResult* outResult) |
| 2340 | { |
| 2341 | static uint32 uniqueIdx = 0; |
| 2342 | BfpSystem_InterlockedExchangeAdd32(&uniqueIdx, 1); |
| 2343 | |
| 2344 | Beefy::HashContext ctx; |
| 2345 | ctx.Mixin(uniqueIdx); |
| 2346 | ctx.Mixin(getpid()); |
| 2347 | ctx.Mixin(Beefy::BFGetTickCountMicro()); |
| 2348 | |
| 2349 | uint64 hash = ctx.Finish64(); |
| 2350 | |
| 2351 | String str = "/tmp/bftmp_"; |
| 2352 | HashEncode64(str, hash); |
| 2353 | |
| 2354 | TryStringOut(str, outName, inOutNameSize, (BfpResult*)outResult); |
| 2355 | } |
| 2356 | |
| 2357 | BFP_EXPORT void BFP_CALLTYPE BfpFile_GetFullPath(const char* inPath, char* outPath, int* inOutPathSize, BfpFileResult* outResult) |
| 2358 | { |
no test coverage detected