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
7
struct
region_file
{
8
rwmutex mtx;
9
file
f;
10
};
11
12
// Close the region file. Only called by the file cache.
13
enum
clod_region_result
region_file_close(
struct
region_file
*f);
14
// Open the region file. Only called by the file cache.
15
enum
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.
17
enum
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
clod_region_result
Definition
region.h:43
region.h
clod_region
Definition
region_impl.h:12
file
Definition
file.c:13
region_file
Definition
region_file.h:7
src
region
region_file.h
Generated by
1.16.1