-/*#ifdef _MSC_VER
- #include <windows.h>
-
- int GetDir(std::string dPath, std::list<std::string> &filenames)
- {
- //For now dPath should have an ending "\"
- WIN32_FIND_DATA FileData;
- HANDLE hFile;
- hFile = FindFirstFile((dPath+"*").c_str(), &FileData);
- if ( hFile == INVALID_HANDLE_VALUE )
- {
- //No files !
- return false;
- }
-
- if( strncmp(FileData.cFileName, ".", 1) != 0 )
- filenames.push_back( dPath+FileData.cFileName );
- while( FindNextFile(hFile, &FileData ) != 0)
- {
- if( strncmp(FileData.cFileName, ".", 1) != 0 )
- filenames.push_back( dPath+FileData.cFileName );
- }
- return true;
- }
-
-#else
- #include <dirent.h>
-
- int GetDir(std::string dPath, std::list<std::string> &filenames)
- {
- DIR *dir = opendir( dPath.c_str() );
- if (dir == NULL)
- return false;
- struct dirent *entry;
- while((entry = readdir(dir)) != NULL)
- {
- // if( strncmp(entry->d_name, ".", 1) != 0 && strncmp(entry->d_name, "..", 2) != 0)
- if( strncmp(entry->d_name, ".", 1) != 0 )
- {
- filenames.push_back( dPath + "/" + entry->d_name );
- }
- }
- closedir(dir);
- return true;
- }
-
-#endif*/
-