GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
isdir.c
Go to the documentation of this file.
1 #include <grass/dbmi.h>
2 #include <unistd.h>
3 #include <sys/types.h>
4 #include <sys/stat.h>
5 
12 int db_isdir(const char *path)
13 {
14  struct stat x;
15 
16  if (stat(path, &x) != 0)
17  return DB_FAILED;
18  return (S_ISDIR(x.st_mode) ? DB_OK : DB_FAILED);
19 }
int stat
Definition: g3dcolor.c:369
int db_isdir(const char *path)
Definition: isdir.c:12