#pragma once #include #include #include namespace mrbesen::Files { void parent(const std::string& child, std::string& out); //get the parent directory of a file or directory path void file(const std::string& path, std::string& out); //get the filename without the path void extention(const std::string& path, std::string& ext); //get the files extenetion enum class FileType : unsigned char { UNKNOWN = 0, FIFO = 1, CHARACTER = 2, DIRECTORY = 4, BLOCK = 6, REGULAR = 8, LINK = 10, SOCKET = 12, WHT = 14 ///???? //copied from dirent.h -> see man readdir }; typedef std::function fileNameFilter; template bool scan(const std::string& path, std::insert_iterator it, bool prefixdir = false, fileNameFilter fnf = fileNameFilter(nullptr)); }