+ if ( !( fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) ) //is it a regular file?
+ {
+ Filenames.push_back( fileName );
+ numberOfFiles++;
+
+ }
+ else if ( fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) //directory?
+ {
+ if ( GDCM_NAME_SPACE::Util::GetName(fileName)[0] != '.' && recursive ) //we also skip hidden files
+ {
+ numberOfFiles += Explore( fileName, recursive);
+ }
+ }
+ else
+ {
+ gdcmErrorMacro( "Unexpected error" );
+ return -1;
+ }
+ }