21 std::string cachePath = ArmarXDataPath::GetCachePath();
22 if (cachePath.empty())
27 cachePath.append(
"/pids/");
30 if (!std::filesystem::exists(dir) && !std::filesystem::create_directories(dir))
32 ARMARX_WARNING_S <<
"Unable to create Cache directory for the ScenarioManager plugin at "
37 std::string
filename = cachePath + app->getPackageName() +
"." + app->getScenario()->getName() +
38 "." + app->getName() + (app->getInstanceName().empty() ?
"" :
".") +
39 app->getInstanceName() +
".pids";
41 if (!std::filesystem::exists(
filename))
57 std::string cachePath = ArmarXDataPath::GetCachePath();
58 cachePath.append(
"/pids/");
61 if (!std::filesystem::exists(dir) && !std::filesystem::create_directories(dir))
63 ARMARX_WARNING_S <<
"Unable to create Cache directory for the ScenarioManager plugin at "
67 std::string
filename = cachePath + app->getPackageName() +
"." + app->getScenario()->getName() +
68 "." + app->getName() + (app->getInstanceName().empty() ?
"" :
".") +
69 app->getInstanceName() +
".pids";
71 if (app->getPid() == -1)
73 std::filesystem::remove(std::filesystem::path(
filename));
79 output << app->getPid();
86 std::string cachePath = ArmarXDataPath::GetCachePath();
87 cachePath.append(
"/pids/");
89 std::filesystem::remove_all(std::filesystem::path(cachePath));