Rewrote the FileUtils support for data and library file paths, moving the

storage of the path lists into osgDB::Registry, and changed the data
structor from a char* to a std::deque.  Changed a names of couple of the
convinience functions in osgDB/FileUtils to better reflect the two
public FilePathList's - DataFilePathList and the LibraryFilePathList.

Added support into the osgDB::Registry::readNode/Image/Object methods
for pushing and popping the path of the current file being loaded.
This commit is contained in:
Robert Osfield
2002-06-17 21:50:37 +00:00
parent 27412c27c9
commit 6767dd49d0
17 changed files with 502 additions and 714 deletions

View File

@@ -56,10 +56,10 @@ bool FileInput::open(const std::string& fileName)
if (_file == NULL)
{
// ok havn't found file, resort to using findFile...
char* newFileName = osgDB::findFile(fileName.c_str());
std::string newFileName = osgDB::findDataFile(fileName);
if (!newFileName) return false;
_file=::fopen( newFileName, "rb");
if (newFileName.empty()) return false;
_file=::fopen( newFileName.c_str(), "rb");
if (_file == NULL) return false;
}
_eof = false;