1 /* 2 ** dirlist.h - Get a directory listing 3 ** 4 ** Copyright (c) 1999-2000 Peter Eriksson <pen@signum.se> 5 ** 6 ** This program is free software; you can redistribute it and/or 7 ** modify it as you wish - as long as you don't claim that you wrote 8 ** it. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 */ 14 15 #ifndef PLIB_DIRLIST_H 16 #define PLIB_DIRLIST_H 17 18 #include <sys/types.h> 19 #include <sys/stat.h> 20 #include <dirent.h> 21 22 typedef struct 23 { 24 int dec; 25 int des; 26 struct dirlist_ent 27 { 28 struct dirent *d; 29 struct stat s; 30 } *dev; 31 } DIRLIST; 32 33 extern DIRLIST * 34 dirlist_get(const char *path); 35 36 extern void 37 dirlist_free(DIRLIST *dlp); 38 39 #endif 40