file.c: moved everything into path.c
This commit is contained in:
parent
c1963d1397
commit
f65dcaaf18
6 changed files with 13 additions and 19 deletions
|
|
@ -58,6 +58,15 @@ int is_abspath(const char *path) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int is_file(const char *path) {
|
||||
|
||||
struct stat st;
|
||||
|
||||
if (path && stat(path, &st) >= 0)
|
||||
return S_ISREG(st.st_mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int is_dir(const char *path) {
|
||||
|
||||
struct stat st;
|
||||
|
|
|
|||
Reference in a new issue