반응형
size_t getNumberOfFilesInDirectoryRecursively(std::filesystem::path path)
{
size_t count = 0;
std::filesystem::recursive_directory_iterator iterator(path, std::filesystem::directory_options::skip_permission_denied);
for (auto& entry : iterator)
{
if (std::filesystem::is_regular_file(entry))
{
count++;
}
}
return count;
}반응형
'IT > C++' 카테고리의 다른 글
| 2025년 프로그래밍 언어 트렌드 완벽 정리! Python이 1위? 🐍🔥 (0) | 2025.05.08 |
|---|---|
| Pro*C 호스트변수, 표지변수 (0) | 2024.06.24 |
| How to perform chmod recursively? (0) | 2023.12.19 |
| 리눅스 폴더별 용량 확인하기 (0) | 2023.09.19 |
| zip store (압축율 0%) 옵션으로 압축하기 (0) | 2023.09.12 |
| linux 파일에 lastmodified date 쓰기 (0) | 2023.09.06 |
| Install Google Test and Google Mock on Ubuntu (0) | 2023.08.11 |
| 객체에서 std::shared_ptr 얻기 (0) | 2023.08.07 |
| ASPICE 에 대해서. (0) | 2023.03.30 |
| lambda expression (0) | 2020.09.26 |
댓글