#include #include #include #include #include #include #include #include #include #include #include #include using namespace osg; using namespace osgDB; #define FILEUTILS_MAX_PATH_LENGTH 2048 char *PathDelimitor = ";"; static const char *s_default_file_path = ".;"; static const char *s_default_dso_path = "C:/Windows/System/;"; static char *s_filePath = ".;"; #define F_OK 4 static bool s_filePathInitialized = false; void osgDB::initFilePath( void ) { char *ptr; if( (ptr = getenv( "OSG_FILE_PATH" )) ) { notify(DEBUG_INFO) << "osgDB::Init("< #include osgDB::DirectoryContents osgDB::getDirectoryContents(const std::string& dirName) { osgDB::DirectoryContents contents; WIN32_FIND_DATA data; HANDLE handle = FindFirstFile((dirName + "\\*").c_str(), &data); if (handle != INVALID_HANDLE_VALUE) { do { contents.push_back(data.cFileName); } while (FindNextFile(handle, &data) != 0); FindClose(handle); } return contents; }