format
typescript
File.ReadAllBytes(path)class: File
description
Reads and returns all data from the file at the specified path into a memory stream.
parameter
| param_name | type | description |
|---|---|---|
| path | string | The path of the specified file. |
return
| type | description |
|---|---|
MemoryStream|undefined | If successful, returns the data in the memory stream. Otherwise, returns undefined. |
code example
javascript
function Test(file_path: string) {
try {
let stream = File.ReadAllBytes(file_path);
} catch (error) {
Debug.Error(error);
}
}