Returns the number of pages in this BTreeFile.
()
| 161 | * Returns the number of pages in this BTreeFile. |
| 162 | */ |
| 163 | public int numPages() { |
| 164 | // we only ever write full pages |
| 165 | return (int) ((f.length() - BTreeRootPtrPage.getPageSize())/ BufferPool.getPageSize()); |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Returns the index of the field that this B+ tree is keyed on |