summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-10-28 16:29:21 -0400
committerOz Linden <oz@lindenlab.com>2010-10-28 16:29:21 -0400
commit7d53ee933c4ac75f94e3edc65128e09953e3cdde (patch)
treeedb8a4e486fe210cb4ce1e543d32e2e69c6706e0 /indra/llvfs/lldir.h
parent9abbb6c927d4f4131b0aefe6b847be0b44022c97 (diff)
STORM-477 add unit test for LLDir::getNetFileInDir
--HG-- branch : storm-102
Diffstat (limited to 'indra/llvfs/lldir.h')
-rw-r--r--indra/llvfs/lldir.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h
index 4f63c04aab..0730b0fa79 100644
--- a/indra/llvfs/lldir.h
+++ b/indra/llvfs/lldir.h
@@ -74,7 +74,23 @@ class LLDir
// pure virtual functions
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0;
- virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) = 0;
+
+ /// Walk the files in a directory, with file pattern matching
+ virtual BOOL getNextFileInDir(const std::string &dirname, ///< directory path - must end in trailing slash!
+ const std::string &mask, ///< file pattern string (use "*" for all)
+ std::string &fname, ///< found file name
+ BOOL wrap ///< DEPRECATED - set to FALSE
+ ) = 0;
+ /**<
+ * @returns true if a file was found, false if the entire directory has been scanned.
+ *
+ * @note that this function is NOT thread safe
+ *
+ * This function may not be used to scan part of a directory, then start a new search of a different
+ * directory, and then restart the first search where it left off.
+ *
+ * @todo this really should be rewritten as an iterator object.
+ */
virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) = 0;
virtual std::string getCurPath() = 0;
virtual BOOL fileExists(const std::string &filename) const = 0;