Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Folder.cpp 603B

123456789101112131415161718192021222324252627
  1. /*!
  2. * \file test/Folder.cpp
  3. * \brief File system utils unit test
  4. *
  5. * \author xythobuz
  6. */
  7. #include <iostream>
  8. #include "global.h"
  9. #include "utils/File.h"
  10. #include "utils/Folder.h"
  11. int main() {
  12. Folder f(".");
  13. std::cout << f.folderCount() << " folders:" << std::endl;
  14. for (unsigned long i = 0; i < f.folderCount(); i++)
  15. std::cout << "\t" << f.getFolder(i).getName() << std::endl;
  16. std::cout << f.fileCount() << " files:" << std::endl;
  17. for (unsigned long i = 0; i < f.fileCount(); i++)
  18. std::cout << "\t" << f.getFile(i).getName() << std::endl;
  19. return 0;
  20. }