## File::ReadAllBytes method


将指定二进制文件的内容读取到字节数组中。

```cpp
static ArrayPtr<uint8_t> System::IO::File::ReadAllBytes(const String &path)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| 路径 | const String\& | 要读取的文件路径 |

### ReturnValue

包含文件内容的字节数组

## 另见

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [String](../../../system/string/)
* Class [File](../)
* Namespace [System::IO](../../)
* Library [Aspose.Font for C++](../../../)
