Updates to osgDB::Archive support, and refactoring of implementation of

reading files in Registry to faciliate the new archiving support.
This commit is contained in:
Robert Osfield
2004-11-08 16:11:07 +00:00
parent f84f8d87e0
commit d26c8460dc
4 changed files with 238 additions and 706 deletions

View File

@@ -16,8 +16,11 @@
#include <osgDB/Archive>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileUtils>
#include <iostream>
#include <algorithm>
int main( int argc, char **argv )
{
@@ -94,7 +97,23 @@ int main( int argc, char **argv )
{
if (!arguments.isOption(pos))
{
files.push_back(arguments[pos]);
if (insert)
{
osgDB::FileType fileType = osgDB::fileType(arguments[pos]);
if (fileType==osgDB::REGULAR_FILE)
{
files.push_back(arguments[pos]);
}
else if (fileType==osgDB::DIRECTORY)
{
osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]);
files.insert(files.end(),directory.begin(),directory.end());
}
}
else
{
files.push_back(arguments[pos]);
}
}
}