Method Stdio.read_bytes()
- Method
read_bytes
stringread_bytes(stringfilename,intstart,intlen)
stringread_bytes(stringfilename,intstart)
stringread_bytes(stringfilename)- Description
Read
lennumber of bytes from a regular filefilenamestarting at bytestart, and return it as a string.If
lenis omitted, the rest of the file will be returned.If
startis also omitted, the entire file will be returned.- Throws
Throws an error on any I/O error except when the file doesn't exist.
- Returns
Returns
0(zero) if the file doesn't exist or ifstartis beyond the end of it.Returns a string with the requested data otherwise.
- See also