Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
If若 `f`refers to an open file, this function attempts to close the file. Regardless of whether an error occurs or not, a subsequent call to `f.is_open()` will return `false`. The function will ensure that引用一个打开的文件,此函数将尝试将其关闭。无论关闭过程中是否发生错误,后续对 `f.is_open()` 的调用均会返回 `false`。同时,该函数会根据实际执行情况设置错误代码:若未发生错误,则确保 `!ec`is为 `true`if there was no error or set to the appropriate error code if an error occurred.;若发生错误,则将其设置为相应的错误代码。