Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Constructor
* @param dirName root directory name
* @param recursive whether we want to explore recursively or not
*/
DirList::DirList(std::string const &dirName, bool recursive)
{
* \brief Constructor
* @param dirName root directory name
* @param recursive whether we want to explore recursively or not
*/
DirList::DirList(std::string const &dirName, bool recursive)
{
-#if defined(_MSC_VER) || defined(__BORLANDC__)
- WIN32_FIND_DATA fileData;
- HANDLE hFile=FindFirstFile((dirName+"*").c_str(),&fileData);
- int found = true;
+#ifdef _MSC_VER
+ WIN32_FIND_DATA fileData;
+ HANDLE hFile = FindFirstFile((dirName+"*").c_str(), &fileData);
if( fileName != "." && fileName != ".." && recursive )
{
numberOfFiles += Explore(dirName+fileName,recursive);
if( fileName != "." && fileName != ".." && recursive )
{
numberOfFiles += Explore(dirName+fileName,recursive);
// According to POSIX, the dirent structure contains a field char d_name[]
// of unspecified size, with at most NAME_MAX characters preceding the
// According to POSIX, the dirent structure contains a field char d_name[]
// of unspecified size, with at most NAME_MAX characters preceding the
stat(fileName.c_str(), &buf); //really discard output ?
if( S_ISREG(buf.st_mode) ) //is it a regular file?
{
stat(fileName.c_str(), &buf); //really discard output ?
if( S_ISREG(buf.st_mode) ) //is it a regular file?
{