Skip to content

Commit

Permalink
fix file.h doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Dec 9, 2024
1 parent a17115f commit 2d30738
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ortools/base/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ class File {
#ifndef SWIG // no overloading
// Opens file "name" with flags specified by "mode".
// Flags are defined by fopen(), that is "r", "r+", "w", "w+". "a", and "a+".
// The caller should free the File after closing it by passing the returned
// pointer to delete.
// The caller should call Close() to free the File after closing it.
static File* Open(absl::string_view filename, absl::string_view mode);

// Opens file "name" with flags specified by "mode".
// If open failed, program will exit.
// The caller should free the File after closing it by passing the returned
// pointer to delete.
// The caller should call Close() to free the File after closing it.
static File* OpenOrDie(absl::string_view filename, absl::string_view mode);
#endif // SWIG

Expand Down Expand Up @@ -71,7 +69,7 @@ class File {
// Writes a string to file and append a "\n".
bool WriteLine(absl::string_view line);

// Closes the file.
// Closes the file and delete the underlying FILE* descriptor.
bool Close();
absl::Status Close(int flags);

Expand Down

0 comments on commit 2d30738

Please sign in to comment.