summaryrefslogtreecommitdiff
path: root/file.h
blob: 3081244ed1e813268929c8c683a90039c440e6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _H_FILE
#define _H_FILE

#include <stddef.h>

#include "http.h"

enum serve_method {
	SERVE_METHOD_FILE,
	SERVE_METHOD_PHP,
	SERVE_METHOD_ERROR
};

const char *file_path_for_uri(const char *);

enum serve_method file_method_for_path(const char *, enum http_res_code *);

int file_read(const char *, int);
int file_read_php(const char *, const char *, int);

#endif