Replace Line

Replaces the given line with the existing line at the entered line number.


⬅️INPUT

Parameter

Type

Required

Description

FilePath

String

✅Yes*

Path of the file to modify

Text

String

✅Yes*

Text content to modify

Line

String

✅Yes

New line content

LineNumber

Int32

✅Yes

Line number to replace

Encoding

String

❌No

File encoding


➡️OUTPUT

Name

Data Type

Description

IsReplaceLineSuccessful

Boolean

Returns "True" if the operation succeeds, "False" if it fails.

ReplaceLineMessage

String

Returns the error information received if the operation fails.

ReplaceLineResult

String


⬇️MISC

Parameter

Type

Default

Description

ThrowException

Boolean

❌No

Throw exception on error (default: No)