- Method read_bytes
string read_bytes(string filename, int start, int len)
string read_bytes(string filename, int start)
string read_bytes(string filename)
Read len number of bytes from a regular file filename starting at byte start, and return it as a string.
If len is omitted, the rest of the file will be returned.
If start is also omitted, the entire file will be returned.
Throws an error on any I/O error except when the file doesn't exist.
0(zero) if the file doesn't exist or if start is beyond the end of it.
Returns a string with the requested data otherwise.
- See also