libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
file.h
1
#ifndef LIBCLOD_FILE_H
2
#define LIBCLOD_FILE_H
3
4
#include <
clod/lib.h
>
5
#include <clod/stream.h>
6
#include <
clod/memory.h
>
7
8
#define CLOD_FILE_READ 1
9
#define CLOD_FILE_WRITE 2
10
#define CLOD_FILE_TRUNCATE 4
11
#define CLOD_FILE_CREATE 8
12
#define CLOD_FILE_APPEND 16
13
#define CLOD_FILE_DIRECTORY 32
14
15
#define CLOD_DIRENT_FILE 128
16
#define CLOD_DIRENT_DIRECTORY 129
17
21
struct
clod_dirent
{
23
struct
clod_dirent
*
next
;
24
26
uintptr_t
id
;
27
29
unsigned
short
name_size
;
30
32
unsigned
char
type
;
33
35
char
name
[];
36
};
37
46
CLOD_API CLOD_NONNULL(1)
47
int clod_file(
48
clod_stream
*stream_out,
49
const
clod_stream
*directory,
50
const
char
*path,
51
int
flags
52
);
53
54
#endif
lib.h
memory.h
Memory allocation methods.
clod_dirent
Definition
file.h:21
clod_dirent::next
struct clod_dirent * next
Pointer to the next directory entry.
Definition
file.h:23
clod_dirent::name_size
unsigned short name_size
Size of name.
Definition
file.h:29
clod_dirent::name
char name[]
Name of the entry.
Definition
file.h:35
clod_dirent::id
uintptr_t id
Unique identifier for the entry.
Definition
file.h:26
clod_dirent::type
unsigned char type
Type of the entry.
Definition
file.h:32
clod_stream
Definition
stream.h:55
include
clod
file.h
Generated by
1.16.1