/[sudobot]/trunk/lib/common/io/io.c
ViewVC logotype

Contents of /trunk/lib/common/io/io.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: text/x-c
File size: 252 byte(s)
chore: add trunk
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <fcntl.h>
5 #include "io.h"
6
7 bool io_file_exists(const char *restrict path)
8 {
9 int fd = open(path, O_RDONLY);
10
11 if (fd < 0)
12 return false;
13
14 close(fd);
15 return true;
16 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26