MCPcopy Create free account
hub / github.com/benkuper/Chataigne / launchFile

Method launchFile

Source/Module/modules/system/os/OSModule.cpp:191–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191bool OSModule::launchFile(File f, String args)
192{
193 if (!f.exists())
194 {
195 NLOGWARNING(niceName, "File does not exist : " + f.getFullPathName());
196 return false;
197 }
198
199 File wDir = File::getCurrentWorkingDirectory();
200 f.getParentDirectory().setAsCurrentWorkingDirectory();
201 bool result = f.startAsProcess(args);
202 wDir.setAsCurrentWorkingDirectory();
203
204 if (result) outActivityTrigger->trigger();
205 else NLOGERROR(niceName, "Could not launch application " + f.getFullPathName() + " with arguments : " + args);
206
207 return result;
208}
209
210void OSModule::launchCommand(const String& command, bool silentMode)
211{

Callers 2

launchFileFromScriptMethod · 0.80
triggerInternalMethod · 0.80

Calls 1

triggerMethod · 0.80

Tested by

no test coverage detected