This does not change the name of the physical file bound to the File. The member function close closes a file. Both call stdio ungetc . While intermixing File and system IO calls is not at all recommended, this technique does allow the File class to be used in conjunction with other functions and libraries already set up to operate on file descriptors. File Status File status is maintained in several ways.
Errors occuring during constructors and file opens also invoke the function error .
Since error cannot tell if the current system error is actually responsible for a failure, it may at times print out spurious messages. Three error handlers are provided. C programmers who are unfamiliar with these conventions should note that, unlike the stdio library, File functions indicate IO success, status, or failure solely through the state, not via return values of the functions. Most code using previous versions should still work. Additionally, the feature of previous streams that allowed free intermixing of stream and stdio input and output is no longer guaranteed to always behave as desired.