---
title: "readFromBinaryFile"
canonical: "https://support.appfire.com/space/PSCONF/15305452/readFromBinaryFile"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | readFromBinaryFile(path) | **Package** | file |
> | **Alias** |  | **Pkg Usage** | readBinary(path) |

## Description

> Macro (excerpt)
> 
> Read the text of a binary file.

Read the bytes of a binary file.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | Path | String | Yes | Specifies the file name to read from. |

## Return Type

**Byte []**

An array of bytes read from the binary file.

## Example

### Example 1

```
byte [] fileContent = readFromBinaryFile("C:/icon.jpg");
```

> ⚠️ It is recommended that you use forward slashes () for file paths. As a general observation use the silEnv() routine to create an absolute path.

## See also

> Macro (contentbylabel)