GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
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
}
lib
db
dbmi_base
isdir.c
Generated on Sun Sep 9 2012 18:55:33 for GRASS Programmer's Manual by
1.8.1.2