| 147 | } |
| 148 | |
| 149 | bool ScanDir::isDirectory() |
| 150 | { |
| 151 | #if defined(_WIN32) |
| 152 | return (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; |
| 153 | #elif defined(HAVE_STRUCT_DIRENT_D_TYPE) && !defined(LSB_BUILD) |
| 154 | return (data->d_type == DT_DIR); |
| 155 | #else |
| 156 | struct STAT buf; |
| 157 | |
| 158 | if (os_utils::stat(getFilePath(), &buf)) |
| 159 | return false; |
| 160 | |
| 161 | return S_ISDIR (buf.st_mode); |
| 162 | #endif |
| 163 | } |
| 164 | |
| 165 | bool ScanDir::isDots() |
| 166 | { |