aboutsummaryrefslogtreecommitdiff
path: root/common/file.h
blob: 5d875c99a4c5badff81d364655303a2ce4c793b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _UWU_COMMON_FILE_H_
#define _UWU_COMMON_FILE_H_

#include <stdio.h>
#include <stdbool.h>

inline static bool file_exists(const char *filename)
{
	FILE *f = fopen(filename, "r");

	if (f) {
		fclose(f);
		return true;
	}

	return false;
}

#endif