diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-29 17:04:41 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-29 17:04:41 -0800 |
| commit | af120041b68f2b9221bdd3cf0047f7e20705aa5a (patch) | |
| tree | 344d9bbf86c758ee695eba620342f713a0bd2122 /toolsrc/src/vcpkg_Files.cpp | |
| parent | 7097f27cadf45d4b891396cb6bc24eddba3dd698 (diff) | |
| download | vcpkg-af120041b68f2b9221bdd3cf0047f7e20705aa5a.tar.gz vcpkg-af120041b68f2b9221bdd3cf0047f7e20705aa5a.zip | |
Move file functions to vcpkg_Files.h
Diffstat (limited to 'toolsrc/src/vcpkg_Files.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg_Files.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 611aa7450..42e815cc2 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -58,4 +58,19 @@ namespace vcpkg {namespace Files return current_dir; } + + void recursive_find_files_with_extension_in_dir(const fs::path& dir, const std::string& extension, std::vector<fs::path>* output) + { + recursive_find_matching_paths_in_dir(dir, [&extension](const fs::path& current) + { + return !fs::is_directory(current) && current.extension() == extension; + }, output); + } + + std::vector<fs::path> recursive_find_files_with_extension_in_dir(const fs::path& dir, const std::string& extension) + { + std::vector<fs::path> v; + recursive_find_files_with_extension_in_dir(dir, extension, &v); + return v; + } }} |
