(path string, srcPage common.Pgid, target common.Pgid)
| 8 | ) |
| 9 | |
| 10 | func CopyPage(path string, srcPage common.Pgid, target common.Pgid) error { |
| 11 | p1, d1, err1 := guts_cli.ReadPage(path, uint64(srcPage)) |
| 12 | if err1 != nil { |
| 13 | return err1 |
| 14 | } |
| 15 | p1.SetId(target) |
| 16 | return guts_cli.WritePage(path, d1) |
| 17 | } |
| 18 | |
| 19 | func ClearPage(path string, pgId common.Pgid) (bool, error) { |
| 20 | return ClearPageElements(path, pgId, 0, -1, false) |