Root/
Source at commit 261 created 12 years 11 months ago. By ifabio, "re-open": create two folder, one for the prefpanel project, other for chameleon bootloader trunk, also synk with latest 832 trunk's code, added some stuff like OpenBSD/FreeBSD/Haiku detection, and added more Nvidia ID cards. | |
---|---|
1 | /*␊ |
2 | * file_util.h␊ |
3 | * ChameleonPrefPane␊ |
4 | *␊ |
5 | * Created by Rekursor on 1/24/10.␊ |
6 | *␊ |
7 | */␊ |
8 | #ifndef __CHFILE_UTIL_H␊ |
9 | #define __CHFILE_UTIL_H␊ |
10 | #include <sys/stat.h>␊ |
11 | ␊ |
12 | /**␊ |
13 | * Check whether file exists:␊ |
14 | */␊ |
15 | inline bool fileExists(const char * str) ␊ |
16 | { ␊ |
17 | ␉struct stat stFileInfo; ␊ |
18 | ␉if((stat(str,&stFileInfo)) == 0) return true; ␊ |
19 | ␉else return false;␊ |
20 | }␊ |
21 | ␊ |
22 | inline bool fileExists(std::string str) {return fileExists(str.c_str());}␊ |
23 | ␊ |
24 | ␊ |
25 | #endif␊ |
26 |