diff --git a/.gitignore b/.gitignore index b8b02a4..c28a26c 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,7 @@ # ---> Cmake Makefile CMakeCache.txt -cmake_install.cmake_install +cmake_install.cmake CMakeFiles # ---> Personal diff --git a/fs_reader.cpp b/fs_reader.cpp deleted file mode 100644 index a8683d5..0000000 --- a/fs_reader.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include -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 find_all_files(std::string filesystem_path) { - for (const auto & entry : fs::directory_iterator(filesystem_path)) { - std::cout << entry.path() << "\n"; - } - return std::vector(0) = {}; -} - -std::vector find_all_folders(std::string filesystem_path) { - return std::vector(0) = {}; -} - -std::vector find_all_files_and_folders(std::string filesystem_path) { - std::vector files = find_all_files(filesystem_path); - std::vector folders = find_all_folders(filesystem_path); - std::vector 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(0) = {}; -} diff --git a/fs_reader.h b/fs_reader.h deleted file mode 100644 index d7af628..0000000 --- a/fs_reader.h +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include - -std::vector find_all_files(std::string filesystem_path); -std::vector find_all_folders(std::string filesystem_path); -std::vector find_all_files_and_folders(std::string filesystem_path); \ No newline at end of file diff --git a/main.cpp b/main.cpp deleted file mode 100644 index 0bc97a5..0000000 --- a/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "fs_reader.h" - -int main(int argc, char *argv[]) { - (void)find_all_files_and_folders(argv[1]); - return 0; -} \ No newline at end of file