17 lines
630 B
C++
17 lines
630 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
#include <filesystem>
|
|
|
|
class TreeStructurer {
|
|
public:
|
|
TreeStructurer() = default;
|
|
std::vector<std::string> get_directory_structure(const std::string& startpath = std::filesystem::current_path().string());
|
|
|
|
private:
|
|
bool should_ignore_dir(const std::string& dirname);
|
|
bool should_ignore_file(const std::string& filename);
|
|
std::string create_indent(int level);
|
|
std::string get_relative_path(const std::filesystem::path& path, const std::filesystem::path& base);
|
|
std::vector<std::filesystem::path> get_filtered_paths(const std::filesystem::path& start);
|
|
}; |