summaryrefslogtreecommitdiff
path: root/src/fileio.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.h')
-rw-r--r--src/fileio.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fileio.h b/src/fileio.h
index 6d4aed2b4..7c8a80221 100644
--- a/src/fileio.h
+++ b/src/fileio.h
@@ -96,4 +96,20 @@ bool FileExists(const char *filename);
extern char *_personal_dir; ///< custom directory for personal settings, saves, newgrf, etc.
+/** Helper for scanning for files with a given name */
+class FileScanner
+{
+public:
+ uint Scan(const char *extension, Subdirectory sd, bool tars = true);
+
+ /**
+ * Add a file with the given filename.
+ * @param filename the full path to the file to read
+ * @param basepath_length amount of characters to chop of before to get a
+ * filename relative to the search path.
+ * @return true if the file is added.
+ */
+ virtual bool AddFile(const char *filename, size_t basepath_length) = 0;
+};
+
#endif /* FILEIO_H */