diff options
Diffstat (limited to 'node/Utils.hpp')
| -rw-r--r-- | node/Utils.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/node/Utils.hpp b/node/Utils.hpp index b1917b27..fbabe3d7 100644 --- a/node/Utils.hpp +++ b/node/Utils.hpp @@ -38,6 +38,7 @@ #include <string> #include <stdexcept> #include <vector> +#include <map> #include "../ext/lz4/lz4.h" #include "../ext/lz4/lz4hc.h" @@ -59,6 +60,16 @@ class Utils { public: /** + * List a directory's contents + * + * @param path Path to list + * @param files Set to fill with files + * @param directories Set to fill with directories + * @return Map of entries and whether or not they are also directories (empty on failure) + */ + static std::map<std::string,bool> listDirectory(const char *path); + + /** * @param data Data to convert to hex * @param len Length of data * @return Hexadecimal string |
