|
| 1 | +:github_url: hide |
| 2 | + |
| 3 | +.. DO NOT EDIT THIS FILE!!! |
| 4 | +.. Generated automatically from Godot engine sources. |
| 5 | +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. |
| 6 | +.. XML source: https://github.com/godotengine/godot/tree/master/api/classes/CommandSync.xml. |
| 7 | +
|
| 8 | +.. _class_CommandSync: |
| 9 | + |
| 10 | +CommandSync |
| 11 | +=========== |
| 12 | + |
| 13 | +**Inherits:** `RefCounted <https://docs.godotengine.org/en/stable/classes/class_refcounted.html>`_ |
| 14 | + |
| 15 | +Execute a blocking OS command |
| 16 | + |
| 17 | +.. rst-class:: classref-introduction-group |
| 18 | + |
| 19 | +Description |
| 20 | +----------- |
| 21 | + |
| 22 | +The **CommandSync** class allows you to syncronously execute a command that will block the executing thread. |
| 23 | + |
| 24 | +.. rst-class:: classref-reftable-group |
| 25 | + |
| 26 | +Properties |
| 27 | +---------- |
| 28 | + |
| 29 | +.. table:: |
| 30 | + :widths: auto |
| 31 | + |
| 32 | + +----------------------------------------------------------------------------------------------------+--------------------------------------------------+-------+ |
| 33 | + | `PackedStringArray <https://docs.godotengine.org/en/stable/classes/class_packedstringarray.html>`_ | :ref:`args<class_CommandSync_property_args>` | | |
| 34 | + +----------------------------------------------------------------------------------------------------+--------------------------------------------------+-------+ |
| 35 | + | `String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ | :ref:`cmd<class_CommandSync_property_cmd>` | | |
| 36 | + +----------------------------------------------------------------------------------------------------+--------------------------------------------------+-------+ |
| 37 | + | `int <https://docs.godotengine.org/en/stable/classes/class_int.html>`_ | :ref:`code<class_CommandSync_property_code>` | ``0`` | |
| 38 | + +----------------------------------------------------------------------------------------------------+--------------------------------------------------+-------+ |
| 39 | + | `String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ | :ref:`stdout<class_CommandSync_property_stdout>` | | |
| 40 | + +----------------------------------------------------------------------------------------------------+--------------------------------------------------+-------+ |
| 41 | + |
| 42 | +.. rst-class:: classref-reftable-group |
| 43 | + |
| 44 | +Methods |
| 45 | +------- |
| 46 | + |
| 47 | +.. table:: |
| 48 | + :widths: auto |
| 49 | + |
| 50 | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| 51 | + | void | :ref:`_init<class_CommandSync_method__init>` **(** `String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ command, `PackedStringArray <https://docs.godotengine.org/en/stable/classes/class_packedstringarray.html>`_ arguments **)** | |
| 52 | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| 53 | + | `String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ | :ref:`_to_string<class_CommandSync_method__to_string>` **(** **)** | |
| 54 | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| 55 | + | `int <https://docs.godotengine.org/en/stable/classes/class_int.html>`_ | :ref:`execute<class_CommandSync_method_execute>` **(** **)** | |
| 56 | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| 57 | + |
| 58 | +.. rst-class:: classref-section-separator |
| 59 | + |
| 60 | +---- |
| 61 | + |
| 62 | +.. rst-class:: classref-descriptions-group |
| 63 | + |
| 64 | +Property Descriptions |
| 65 | +--------------------- |
| 66 | + |
| 67 | +.. _class_CommandSync_property_args: |
| 68 | + |
| 69 | +.. rst-class:: classref-property |
| 70 | + |
| 71 | +`PackedStringArray <https://docs.godotengine.org/en/stable/classes/class_packedstringarray.html>`_ **args** |
| 72 | + |
| 73 | +Array of arguments to pass to the command |
| 74 | + |
| 75 | +.. rst-class:: classref-item-separator |
| 76 | + |
| 77 | +---- |
| 78 | + |
| 79 | +.. _class_CommandSync_property_cmd: |
| 80 | + |
| 81 | +.. rst-class:: classref-property |
| 82 | + |
| 83 | +`String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ **cmd** |
| 84 | + |
| 85 | +Path to the command to execute |
| 86 | + |
| 87 | +.. rst-class:: classref-item-separator |
| 88 | + |
| 89 | +---- |
| 90 | + |
| 91 | +.. _class_CommandSync_property_code: |
| 92 | + |
| 93 | +.. rst-class:: classref-property |
| 94 | + |
| 95 | +`int <https://docs.godotengine.org/en/stable/classes/class_int.html>`_ **code** = ``0`` |
| 96 | + |
| 97 | +The exit code of the command after execution |
| 98 | + |
| 99 | +.. rst-class:: classref-item-separator |
| 100 | + |
| 101 | +---- |
| 102 | + |
| 103 | +.. _class_CommandSync_property_stdout: |
| 104 | + |
| 105 | +.. rst-class:: classref-property |
| 106 | + |
| 107 | +`String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ **stdout** |
| 108 | + |
| 109 | +The command output after execution |
| 110 | + |
| 111 | +.. rst-class:: classref-section-separator |
| 112 | + |
| 113 | +---- |
| 114 | + |
| 115 | +.. rst-class:: classref-descriptions-group |
| 116 | + |
| 117 | +Method Descriptions |
| 118 | +------------------- |
| 119 | + |
| 120 | +.. _class_CommandSync_method__init: |
| 121 | + |
| 122 | +.. rst-class:: classref-method |
| 123 | + |
| 124 | +void **_init** **(** `String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ command, `PackedStringArray <https://docs.godotengine.org/en/stable/classes/class_packedstringarray.html>`_ arguments **)** |
| 125 | + |
| 126 | +.. container:: contribute |
| 127 | + |
| 128 | + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! |
| 129 | + |
| 130 | +.. rst-class:: classref-item-separator |
| 131 | + |
| 132 | +---- |
| 133 | + |
| 134 | +.. _class_CommandSync_method__to_string: |
| 135 | + |
| 136 | +.. rst-class:: classref-method |
| 137 | + |
| 138 | +`String <https://docs.godotengine.org/en/stable/classes/class_string.html>`_ **_to_string** **(** **)** |
| 139 | + |
| 140 | +.. container:: contribute |
| 141 | + |
| 142 | + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! |
| 143 | + |
| 144 | +.. rst-class:: classref-item-separator |
| 145 | + |
| 146 | +---- |
| 147 | + |
| 148 | +.. _class_CommandSync_method_execute: |
| 149 | + |
| 150 | +.. rst-class:: classref-method |
| 151 | + |
| 152 | +`int <https://docs.godotengine.org/en/stable/classes/class_int.html>`_ **execute** **(** **)** |
| 153 | + |
| 154 | +Execute the command in a thread and return the command's exit code. |
| 155 | + |
| 156 | +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` |
| 157 | +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` |
| 158 | +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` |
| 159 | +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` |
| 160 | +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` |
| 161 | +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` |
| 162 | +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` |
0 commit comments