[Top]
Stdio
|
Method Stdio.read_bytes()
- Method
read_bytes
-
string Stdio.read_bytes(string filename, int start, int len)
string Stdio.read_bytes(string filename, int start)
string Stdio.read_bytes(string filename)
- Description
-
Read len number of bytes from the 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
-
Throws an error if filename isn't a regular file.
- Returns
-
Returns 0 (zero) on failure to open filename .
Returns a string with the requested data otherwise.
- See also
-
read_file , write_file() , append_file()
|