diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
commit | f57aa3e83f1b4286b1d6b5cc8bca20fb924cb002 (patch) | |
tree | 12dae11397876ce10d75eeabe5b1656ea18cd6ac /indra/llvfs/lldir.h | |
parent | b429ff8ec3e1aebc60ff7f4d3376cfc8b9f2e669 (diff) | |
parent | f9b9c7a5816cf0b9627a4a50e73a663667937145 (diff) |
merge changes for i18n fixes
Diffstat (limited to 'indra/llvfs/lldir.h')
-rw-r--r-- | indra/llvfs/lldir.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 4f63c04aab..42996fd051 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -74,8 +74,32 @@ 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; - virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) = 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 ///< output: found file name + ) = 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; the entire search must run to + * completion or be abandoned - there is no restart. + * + * @bug: See http://jira.secondlife.com/browse/VWR-23697 + * and/or the tests in test/lldir_test.cpp + * This is known to fail with patterns that have both: + * a wildcard left of a . and more than one sequential ? right of a . + * the pattern foo.??x appears to work + * but *.??x or foo?.??x do not + * + * @todo this really should be rewritten as an iterator object, and the + * filtering should be done in a platform-independent way. + */ + virtual std::string getCurPath() = 0; virtual BOOL fileExists(const std::string &filename) const = 0; |