| 463 | } |
| 464 | |
| 465 | String File::getUniqueName(bool include_hostname) |
| 466 | { |
| 467 | DateTime now = DateTime::now(); |
| 468 | String pid; |
| 469 | #ifdef OPENMS_WINDOWSPLATFORM |
| 470 | pid = (String)GetCurrentProcessId(); |
| 471 | #else |
| 472 | pid = (String)getpid(); |
| 473 | #endif |
| 474 | static std::atomic_int number = 0; |
| 475 | return now.getDate().remove('-') + "_" + now.getTime().remove(':') + "_" + (include_hostname ? String(QHostInfo::localHostName()) + "_" : "") + pid + "_" + (++number); |
| 476 | } |
| 477 | |
| 478 | String File::getOpenMSDataPath() |
| 479 | { |