|
GRASS 8 Programmer's Manual
8.5.0dev(2025)-9d806b45d8
|
DBMI Library (base) - directory entities management. More...
#include <string.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <dirent.h>#include <grass/dbmi.h>
Go to the source code of this file.
Macros | |
| #define | W_OK 2 |
| #define | X_OK 1 |
Functions | |
| dbDirent * | db_dirent (const char *dirname, int *n) |
| Read directory and build an array of dbDirent's. More... | |
| void | db_free_dirent_array (dbDirent *db_dirent, int count) |
| Free dbDirent. More... | |
| dbDirent * | db_alloc_dirent_array (int count) |
| Allocate dirent array. More... | |
DBMI Library (base) - directory entities management.
(C) 1999-2010 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file lib/db/dbmi_base/dirent.c.
| #define W_OK 2 |
Definition at line 29 of file lib/db/dbmi_base/dirent.c.
| #define X_OK 1 |
Definition at line 32 of file lib/db/dbmi_base/dirent.c.
| dbDirent* db_alloc_dirent_array | ( | int | count | ) |
Allocate dirent array.
| count | number of entities in the array |
Definition at line 166 of file lib/db/dbmi_base/dirent.c.
References count, db_calloc(), db_dirent(), db_init_string(), name, and NULL.
| dbDirent* db_dirent | ( | const char * | dirname, |
| int * | n | ||
| ) |
Read directory and build an array of dbDirent's.
Append one entry with name = NULL to mark end of array
| dirname | directory name | |
| [out] | n | number of entities |
Definition at line 51 of file lib/db/dbmi_base/dirent.c.
References count, and db_dirent().
Referenced by db_alloc_dirent_array(), db_dirent(), and db_free_dirent_array().
| void db_free_dirent_array | ( | dbDirent * | db_dirent, |
| int | count | ||
| ) |
Free dbDirent.
| db_dirent | pointer to dbDirent |
| count | number of entities in the array |
Definition at line 117 of file lib/db/dbmi_base/dirent.c.
References count, db_dirent(), db_free(), db_free_string(), and name.