MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getUniqueName

Method getUniqueName

src/openms/source/SYSTEM/File.cpp:465–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 4

getDateMethod · 0.80
StringClass · 0.50
removeMethod · 0.45
getTimeMethod · 0.45

Tested by

no test coverage detected