summaryrefslogtreecommitdiff
path: root/apps/fileutils.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-10-03 10:38:27 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-10-03 10:38:27 +0000
commit7ae8e44c9556daa07813a3bfd1ace6b0fb0a2aa8 (patch)
tree3ab6dcbeecc43379a776f07e671e03057d7d56e7 /apps/fileutils.h
parentf5452c0bded3147dfc91dc89580e65a879bc50e8 (diff)
downloadrockbox-7ae8e44c9556daa07813a3bfd1ace6b0fb0a2aa8.zip
rockbox-7ae8e44c9556daa07813a3bfd1ace6b0fb0a2aa8.tar.gz
rockbox-7ae8e44c9556daa07813a3bfd1ace6b0fb0a2aa8.tar.bz2
rockbox-7ae8e44c9556daa07813a3bfd1ace6b0fb0a2aa8.tar.xz
add some consistancy to the path #defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11114 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/fileutils.h')
-rw-r--r--apps/fileutils.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/apps/fileutils.h b/apps/fileutils.h
new file mode 100644
index 0000000..4377c14
--- /dev/null
+++ b/apps/fileutils.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2006 Jonathan Gordon
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef _FILEUTILS_H_
+#define _FILEUTILS_H_
+
+enum {
+ DIRWALKER_ERROR = -1,
+ DIRWALKER_OK = 0,
+ DIRWALKER_IGNORE, /* only valid from folder callback */
+ DIRWALKER_LEAVEDIR, /* only valid from file callback */
+ DIRWALKER_QUIT
+};
+
+enum {
+ DIRWALKER_RETURN_ERROR = -1,
+ DIRWALKER_RETURN_SUCCESS,
+ DIRWALKER_RETURN_FORCED
+};
+
+int dirwalker(const char *start_dir, bool recurse, bool is_forward,
+ int (*folder_callback)(const char* dir, void *param),void* folder_param,
+ int (*file_callback)(const char* folder,const char* file,
+ const int file_attr,void *param),void* file_param);
+
+#endif /* _FILEUTILS_H_ */