From Sukender, new ExternalFileWriter helper class that helps the management of writing out external files to disk

avoid writing out of duplicates.
This commit is contained in:
Robert Osfield
2011-05-12 13:27:14 +00:00
parent b380387f53
commit 066a1f6e72
5 changed files with 375 additions and 0 deletions

View File

@@ -413,6 +413,12 @@ std::string::const_iterator osgDB::PathIterator::next(std::string::const_iterato
return std::find_first_of(it, end, PATH_SEPARATORS, PATH_SEPARATORS+PATH_SEPARATORS_LEN);
}
void osgDB::getPathElements(const std::string& path, std::vector<std::string> & out_elements)
{
out_elements.clear();
for(osgDB::PathIterator it(path); it.valid(); ++it) out_elements.push_back(*it);
}
std::string osgDB::getPathRoot(const std::string& path) {
// Test for unix root