Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Attempts to write `n` bytes from the buffer pointed to by `c` to the current file offset of the open file referred to by `f`. The memory buffer at `c` must point to storage of at least `n` bytes meant to be copied to the file. The function advances the file offset by the amount written, and returns the number of bytes actually written, which may be less than `n`. If `f` does not refer to an open file, the function will set该函数尝试将 `c` 指向的缓冲区中的 `n` 个字节写入 `f` 引用的打开文件的当前文件偏移量处。`c` 处的内存缓冲区必须指向大小至少为 `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.;若发生错误,则将其设置为相应的错误代码。