ReadFileAsHex (read file bytes)
ts
function ReadFileAsHex(what: string; offset, count: number): string;
This function reads count
bytes, starting at offset
position, from what
file. The read bytes are returned as a hexadecimal (base16-encoded) string.
This function accepts the following parameters:
Parameter | Type | Requirement | Explanation |
---|---|---|---|
what | string | required | must be a valid and existing path to a file you wish to read |
offset | number | required | the starting byte from which the file should be read |
count | number | required | the number of bytes to read |
Return value:
Type | Explanation |
---|---|
string | the base16-encoded (hexadecimal) bytes read from the file |