fix mistake in .gitignore

This commit is contained in:
AustrianToast 2024-02-14 00:24:21 +01:00
parent 33efe3686b
commit 5c780a75eb
No known key found for this signature in database
GPG Key ID: 5CD422268E489EB4
4 changed files with 1 additions and 47 deletions

2
.gitignore vendored
View File

@ -35,7 +35,7 @@
# ---> Cmake
Makefile
CMakeCache.txt
cmake_install.cmake_install
cmake_install.cmake
CMakeFiles
# ---> Personal

View File

@ -1,33 +0,0 @@
#include <string>
#include <vector>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
// from the provided path, find all files and folders
// This is done by finding all the files and folders in the starting dir
// If a dir was found, then go into it, then find all files and folders in there
// Rinse and Repeat
// Avoid recursion if possible
std::vector<std::string> find_all_files(std::string filesystem_path) {
for (const auto & entry : fs::directory_iterator(filesystem_path)) {
std::cout << entry.path() << "\n";
}
return std::vector<std::string>(0) = {};
}
std::vector<std::string> find_all_folders(std::string filesystem_path) {
return std::vector<std::string>(0) = {};
}
std::vector<std::string> find_all_files_and_folders(std::string filesystem_path) {
std::vector<std::string> files = find_all_files(filesystem_path);
std::vector<std::string> folders = find_all_folders(filesystem_path);
std::vector<std::string> files_and_folders = {};
files_and_folders.reserve(files.size() + folders.size());
files_and_folders.insert( files_and_folders.end(), files.begin(), files.end() );
files_and_folders.insert( files_and_folders.end(), folders.begin(), folders.end() );
return std::vector<std::string>(0) = {};
}

View File

@ -1,6 +0,0 @@
#include <string>
#include <vector>
std::vector<std::string> find_all_files(std::string filesystem_path);
std::vector<std::string> find_all_folders(std::string filesystem_path);
std::vector<std::string> find_all_files_and_folders(std::string filesystem_path);

View File

@ -1,7 +0,0 @@
#include <iostream>
#include "fs_reader.h"
int main(int argc, char *argv[]) {
(void)find_all_files_and_folders(argv[1]);
return 0;
}