diff options
| author | Juan Linietsky | 2014-06-29 23:24:05 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-06-29 23:24:05 -0300 |
| commit | 7bb5693094b0c624d761cf2044258ea5a21fff4d (patch) | |
| tree | cc465fe54525d6ffff6ecb45804db6abef09a4f0 /core/bind/core_bind.cpp | |
| parent | 01632a824ee7e2326aa90b32d75c2fe09f61a37e (diff) | |
| download | godot-7bb5693094b0c624d761cf2044258ea5a21fff4d.tar.gz godot-7bb5693094b0c624d761cf2044258ea5a21fff4d.tar.zst godot-7bb5693094b0c624d761cf2044258ea5a21fff4d.zip | |
hoh# On branch master
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 4f5358591..64b31d6fd 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -235,7 +235,7 @@ Error _OS::shell_open(String p_uri) { }; -int _OS::execute(const String& p_path, const Vector<String> & p_arguments,bool p_blocking) { +int _OS::execute(const String& p_path, const Vector<String> & p_arguments, bool p_blocking, Array p_output) { OS::ProcessID pid; List<String> args; @@ -243,6 +243,8 @@ int _OS::execute(const String& p_path, const Vector<String> & p_arguments,bool p args.push_back(p_arguments[i]); String pipe; Error err = OS::get_singleton()->execute(p_path,args,p_blocking,&pid, &pipe); + p_output.clear(); + p_output.push_back(pipe); if (err != OK) return -1; else @@ -616,7 +618,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_processor_count"),&_OS::get_processor_count); ObjectTypeDB::bind_method(_MD("get_executable_path"),&_OS::get_executable_path); - ObjectTypeDB::bind_method(_MD("execute","path","arguments","blocking"),&_OS::execute); + ObjectTypeDB::bind_method(_MD("execute","path","arguments","blocking","output"),&_OS::execute,DEFVAL(Array())); ObjectTypeDB::bind_method(_MD("kill","pid"),&_OS::kill); ObjectTypeDB::bind_method(_MD("shell_open","uri"),&_OS::shell_open); ObjectTypeDB::bind_method(_MD("get_process_ID"),&_OS::get_process_ID); |
