Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Attempts to read `n` bytes starting at the current file offset from the open file referred to by `f`. Bytes read are stored in the memory buffer at address `b` which must be at least `n` bytes in size. The function advances the file offset by the amount read, and returns the number of bytes actually read, which may be less than `n`. If `f` does not refer to an open file, the function will set该函数尝试从 `f` 引用的打开文件中,自当前文件偏移量处读取 `n` 个字节。读取的字节将存储到地址 `b` 处的内存缓冲区中,该缓冲区的大小必须至少为 `n` 个字节。该函数会将文件偏移量推进已读取的字节数,并返回实际读取的字节数,该值可能小于 `n`。若 `f` 未引用一个打开的文件,该函数会将 `ec`to设置为 `errc::invalid_argument`and return immediately. The function will ensure that并立即返回。同时,该函数会根据实际执行情况设置错误代码:若未发生错误,则确保 `!ec`is为 `true`if there was no error or set to the appropriate error code if an error occurred. If an end-of-file condition is detected prior to reading any bytes, the function will ensure that;若发生错误,则将其设置为相应的错误代码。若在读取任何字节之前检测到文件结束条件,该函数将确保 `!ec`is为 `true`and the return value shall be 0.,且返回值为 0。