| 105 | } |
| 106 | |
| 107 | void File::close() { |
| 108 | if (isFileValid()) { |
| 109 | MMKVInfo("closing fd[%d], %s", m_fd, m_path.c_str()); |
| 110 | if (::close(m_fd) == 0) { |
| 111 | m_fd = -1; |
| 112 | } else { |
| 113 | MMKVError("fail to close [%s], %d(%s)", m_path.c_str(), errno, strerror(errno)); |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | size_t File::getActualFileSize() const { |
| 119 | # ifdef MMKV_ANDROID |
no test coverage detected