| 1 | #include "KittyIOFile.hpp" |
| 2 | |
| 3 | bool KittyIOFile::open() |
| 4 | { |
| 5 | _error = 0; |
| 6 | |
| 7 | if (_fd >= 0) |
| 8 | close(); |
| 9 | |
| 10 | if (_mode) |
| 11 | _fd = KT_EINTR_RETRY(::open(_filePath.c_str(), _flags, _mode)); |
| 12 | else |
| 13 | _fd = KT_EINTR_RETRY(::open(_filePath.c_str(), _flags)); |
| 14 | |
| 15 | if (_fd < 0) |
| 16 | _error = errno; |
| 17 | |
| 18 | return _fd >= 0; |
| 19 | } |
| 20 |
no outgoing calls
no test coverage detected