From c27f813900a3c114562efbb8df1065e94766fc48 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 10 Feb 2009 15:43:59 -0800 Subject: auto import from //branches/cupcake/...@130745 --- android/utils/dirscanner.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'android/utils/dirscanner.h') diff --git a/android/utils/dirscanner.h b/android/utils/dirscanner.h index 9486cfc..871b05e 100644 --- a/android/utils/dirscanner.h +++ b/android/utils/dirscanner.h @@ -17,9 +17,35 @@ typedef struct DirScanner DirScanner; +/* Create a new directory scanner object from a given rootPath. + * returns NULL in case of failure (error code in errno) + */ DirScanner* dirScanner_new ( const char* rootPath ); + +/* Destroy a given directory scanner. You must always call + * this function to release proper system resources. + */ void dirScanner_free( DirScanner* s ); + +/* Get the name of the next file from a directory scanner. + * Returns NULL when there is no more elements in the list. + * + * This is only the file name, use dirScanner_nextFull to + * get its full path. + * + * This will never return '.' and '..'. + * + * The returned string is owned by the scanner, and will + * change on the next call to this function or when the + * scanner is destroyed. + */ const char* dirScanner_next( DirScanner* s ); + +/* A variant of dirScanner_next() which returns the full path + * to the next directory element. + */ const char* dirScanner_nextFull( DirScanner* s ); +/* */ + #endif /* _ANDROID_UTILS_DIR_H */ -- cgit v1.1