libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
region_file.h
1#ifndef CLOD_REGION_FILE_H
2#define CLOD_REGION_FILE_H
3
4#include <clod/region.h>
5#include "platform/platform.h"
6
7struct region_file {
8 rwmutex mtx;
9 file f;
10};
11
12// Close the region file. Only called by the file cache.
13enum clod_region_result region_file_close(struct region_file *f);
14// Open the region file. Only called by the file cache.
15enum clod_region_result region_file_open(const struct clod_region *r, struct region_file **rf_ptr, const int64_t *pos, bool create);
16// Get the region file for a given position. Should not be closed - the file cache handles file lifetime.
17enum clod_region_result region_file_get(struct clod_region *r, struct region_file **rf_ptr, const int64_t *pos, bool create);
18
19#endif
clod_region_result
Definition region.h:43
Definition file.c:13