File.close

If the file was unopened, succeeds vacuously. Otherwise closes the file (by calling fclose), throwing on error. Even if an exception is thrown, afterwards the File object is empty. This is different from detach in that it always closes the file; consequently, all other File objects referring to the same handle will see a closed file henceforth.

struct File
@trusted
void
close
()

Throws

ErrnoException on error.

Meta

Suggestion Box / Bug Report