Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Attempts to open the file at the path specified by `p` with the mode specified by `m`. Upon success, a subsequent call to `f.is_open()` will return `true`. If `f` refers to an open file, it is first closed as if by a call to `close` with the error ignored. The function will ensure that该函数尝试以 `m` 指定的模式打开 `p` 指定的路径对应的文件。若 `f` 引用一个打开的文件,则先将其关闭,其行为等同于调用 `close`,且忽略可能产生的错误。若打开成功,后续对 `f.is_open()` 的调用均会返回 `true`。同时,该函数会根据实际执行情况设置错误代码:若未发生错误,则确保 `!ec`is为 `true`if there was no error or set to the appropriate error code if an error occurred.;若发生错误,则将其设置为相应的错误代码。