Read File
Command description
Read a text file, such as a .txt file.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| File Path | str | Full path of the file to read, for example C:\xx |
| Format | enum | Auto, utf-8, gb18030, gbk, gb2312, utf-16, big-5, utf-8-sig, utf-16-le, utf-16-be |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Content | str | Read file content |
Edge Cases
- The command reports an error if File Path does not exist, points to a folder, or cannot be opened as text.
- Auto and an empty Format value detect the encoding automatically. Selecting the wrong encoding may cause a decoding error.
- This command reads in text mode and is not suitable for binary files such as images or archives.