Skip to content

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_nametypedescription
pathstringThe path of the specified file.

return

typedescription
MemoryStream|undefinedIf 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);
    }
}