# Read file

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-16fe17ef234f0a75f66653bd0d591d691075f801%2Fimage%20\(13\).png?alt=media)

Element that reads the content file.

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-285a1dcd8b06b984bfca1c6072f14160b7dff6ea%2F1%20\(101\).png?alt=media)

Properties

\- Path\*: \[String] Path to a file to be read (c:\folder\file.txt)

\- Variable (text): \[String] Variable that receives text data from a file

\- Variable (array): \[byte\[]] Variable that accepts binary data in a file

\- Variable (image): \[System.Drawing.Bitmap] Variable that accepts image data from a file

\- Encoding: \[String] Encoding used in a file (utf-8) '<https://docs.microsoft.com/ru-ru/dotnet/api/system.text.encoding>'

```
C#
string txt = System.IO.File.ReadAllText(@"C:\text.txt");
byte[] bytes = System.IO.File.ReadAllBytes(@"C:\bytes.txt");

Python
txt = System.IO.File.ReadAllText("C:\\text.txt")
bytes = System.IO.File.ReadAllBytes("C:\\bytes.txt")

JavaScript
var txt = _lib.System.IO.File.ReadAllText("C:\\text.txt");
var bytes = _lib.System.IO.File.ReadAllBytes("C:\\bytes.txt");
```
