diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-23 20:14:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-23 20:14:59 +0100 |
| commit | a19fe8260a4e1f4cb9d523f5b2cb41eae0a61acd (patch) | |
| tree | 75c53f48321131706c171213a4a873255f20dc53 /src/file.h | |
| parent | d512af5646b85289293858fc98dd7e1f2864fb7d (diff) | |
Add File::open_error().
Diffstat (limited to 'src/file.h')
| -rw-r--r-- | src/file.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -101,9 +101,17 @@ public: return _file; } + /** @return Error returned by the fopen / _wfopen call; + * errno on POSIX, GetLastError() on Windows. + */ + int open_error() const { + return _open_error; + } + private: boost::filesystem::path _path; FILE* _file = nullptr; + int _open_error = 0; }; |
