| 89 | } |
| 90 | |
| 91 | bool DB_Wrap::get_sparse() const |
| 92 | { |
| 93 | int rc; |
| 94 | struct stat statbuf; |
| 95 | |
| 96 | |
| 97 | rc = stat(m_filename.c_str(), &statbuf); |
| 98 | if (rc != 0) |
| 99 | { |
| 100 | std::ostringstream ss; |
| 101 | ss << "stat failed on " << m_filename; |
| 102 | throw Error(ss); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | |
| 107 | if (statbuf.st_size > (statbuf.st_blocks * statbuf.st_blksize)) |
| 108 | return true; |
| 109 | |
| 110 | return false; |
| 111 | } |
| 112 | |
| 113 | bool DB_Wrap::get_swapped() const |
| 114 | { |
no test coverage detected