419:8a7f8272516c | 420:644a6106d712 |
---|---|
56 return FALSE; | 56 return FALSE; |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 | |
62 /* | |
63 * Test if the given file exists. The second option is: | |
64 * R_OK - test for Read rights | |
65 * W_OK - test for Write rights | |
66 * X_OK - test for eXecute rights | |
67 * F_OK - test file presence only | |
68 */ | |
69 int file_exist(char *path, int mode) | |
70 { | |
71 if (access(path, mode) != 0) | |
72 return errno; | |
73 | |
74 return 0; | |
75 } | |
76 | |
77 | |
78 |