aboutsummaryrefslogtreecommitdiffstats
path: root/android/utils/dirscanner.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
commitc27f813900a3c114562efbb8df1065e94766fc48 (patch)
treed95919283707dcab61009e27007374a745c9541e /android/utils/dirscanner.h
parent0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff)
downloadexternal_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'android/utils/dirscanner.h')
-rw-r--r--android/utils/dirscanner.h26
1 files changed, 26 insertions, 0 deletions
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 */