diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-21 21:56:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-21 21:56:05 +0100 |
commit | d8390105c3f8e65d790eb291662382a3095afdeb (patch) | |
tree | cb8d83ff96b14491e99b706c1bb9c035186cdfb0 | |
parent | e1f34249ebacb3098c9da8c21ef47cfc93ac812c (diff) | |
parent | b57dcf446ea1013232a6a553b2a14220aa0a8546 (diff) |
Merge pull request #15917 from brainsick/doc-os-commands
clarify OS.execute usage
-rw-r--r-- | doc/classes/OS.xml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 522a00385a..89b33b3c1c 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -87,7 +87,18 @@ <argument index="3" name="output" type="Array" default="[ ]"> </argument> <description> - Execute the binary file in given path, optionally blocking until it returns. A process ID is returned. + Execute the file at the given path, optionally blocking until it returns. + Platform path resolution will take place. The resolved file must exist and be executable. + Returns a process id. + For example: + [codeblock] + var output = [] + var pid = OS.execute('ls', [], true, output) + [/codeblock] + If you wish to access a shell built-in or perform a composite command, a platform specific shell can be invoked. For example: + [codeblock] + var pid = OS.execute('CMD.exe', ['/C', 'cd %TEMP% && dir'], true, output) + [/codeblock] </description> </method> <method name="find_scancode_from_string" qualifiers="const"> |