mirror of
https://github.com/fumiama/fumidb.git
synced 2026-06-05 08:40:30 +08:00
24 lines
509 B
C
24 lines
509 B
C
#ifndef _FILE_H_
|
|
#define _FILE_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
// 初始化并写入数据库文件头
|
|
int init_file_header_page(int fd);
|
|
|
|
// 获得数据库版本
|
|
uint16_t get_db_version(int fd);
|
|
|
|
// 设置 ptr of unused blk 字段
|
|
int set_first_unused_block(int fd, uint64_t ptr);
|
|
|
|
// 获得 ptr of unused blk 字段
|
|
uint64_t get_first_unused_block(int fd);
|
|
|
|
// 设置 ptr of next table 字段
|
|
int set_first_table(int fd, uint64_t ptr);
|
|
|
|
// 获得 ptr of next table 字段
|
|
uint64_t get_first_table(int fd);
|
|
|
|
#endif |