hdfs::native::hdfsRead
[−]
[src]
pub unsafe extern fn hdfsRead(fs: *const hdfsFS, file: *const hdfsFile, buffer: *mut c_void, length: tSize) -> tSize
Read data from an open file.
Params
fs
- The configured filesystem handle.file
- The file handle.buffer
- The buffer to copy read bytes into.length
- The length of the buffer.
Return
On success, a positive number indicating how many bytes were read. On end-of-file, 0. On error, -1. Errno will be set to the error code. Just like the POSIX read function, hdfsRead will return -1 and set errno to EINTR if data is temporarily unavailable, but we are not yet at the end of the file.