# Add Line

Adds the given line at the desired line number. If the "Line" input is left empty, adds an empty line at the desired line number.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `FilePath` | `String` | ✅Yes\*   | Path of the file to modify |
| `Text`    | `String` | ✅Yes\*   | Text content to modify |
| `Line`    | `String` | ✅Yes     | Content of the line to add |
| `LineNumber` | `Int32` | ✅Yes     | Line number to insert at |
| `Encoding` | `String` | ❌No      | File encoding (UTF-8 etc.) |

\*FilePath and Text are mutually exclusive (OverloadGroup) parameters. One of them is used.


---

### :arrow_right:**OUTPUT**

| Parameter | **Type** | **Description** |
|-----------|------|-------------|
| `IsAddLineSuccessful` | `Boolean` | Returns "**True**" if the operation succeeds, "**False**" if it fails. |
| `AddLineMessage` | `String` | Returns the error information received if the operation fails. |
| `AddlineResult` | `String` | The resulting new text. |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Specifies whether an exception is thrown when the operation fails. The default value is "**No**". |