Read/Write File
An action that reads text or binary data from a file or writes data to a file.

[File Editor Selection]
Select the file editor to use.


[Command]
Select the command to execute.

- Read: Reads a file and stores its content in a variable.
- Read Line: Reads only one line from a file and stores it in a variable. After reading, it automatically moves to the next line.
- Write: Writes text or binary data to a file. Creates a new file if it doesn’t exist.
- Append: Appends data to the existing content of a file. Creates a new file if it doesn’t exist.
- Clear All: Deletes all content from the file.
- Close File: Closes the open file.
- Is End of File: Stores whether the end of file (EOF) has been reached in a variable.
[File Path]
Enter the path of the file. Only displayed when [Command] is not “Is End of File (EOF)”. If you enter a new path without closing the currently open file for reading or writing, the previous file will be automatically closed.

[File Mode]
Select the data type to read or write from the file. Only displayed when [Command] is “Read”, “Write”, or “Append”.

- Text: Reads or writes text from/to the file.
- Binary: Reads or writes binary (byte array) data from/to the file.
[Cursor Position]
Select or enter the cursor position for reading or writing the file. Only displayed when [Command] is “Read”, “Read Line”, or “Write”.

For example:
– When a file is opened, the cursor initially points to the beginning (0) of the file.
– When data is read or written, the cursor moves forward by the amount read or written.
– When the file content is read to the end, the cursor reaches the end of file (EOF).
[Size to Read]
Select or enter the size to read from the file. Only displayed when [Command] is “Read”.

[Input Size to Read]
Enter the byte size to read from the file. Only displayed when [Read Size] is “Set Size”.

[Read Content]
Select a variable to store the content read from the file. Only displayed when [Command] is “Read” or “Read Line”.

[Clear Existing Content]
Select whether to delete existing content when writing data to the file. Only displayed when [Command] is “Write”.

[Write Content]
Enter the data to write to the file. Only displayed when [Command] is “Write” or “Append”.

[Auto Line Break]
Select whether to add a line break before writing text when appending to existing file content. Only displayed when [Command] is “Append”.

[End of File (EOF)]
Select a variable to store whether the cursor has reached the end of file (EOF, End Of File). Only displayed when [Command] is “Is End of File (EOF)”.
