From c434dc99868989ca55aef5e445ac6a0a4c3430f7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 8 Apr 2017 16:26:26 -0700 Subject: [vcpkg] Initial addition of Filesystem abstraction to enable testing. --- toolsrc/src/commands_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_cache.cpp') diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index eae1d8fe3..4c8690c1c 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands::Cache for (auto it = fs::directory_iterator(paths.packages); it != fs::directory_iterator(); ++it) { const fs::path& path = it->path(); - const Expected> pghs = Paragraphs::get_single_paragraph(path / "CONTROL"); + const Expected> pghs = Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); if (auto p = pghs.get()) { const BinaryParagraph binary_paragraph = BinaryParagraph(*p); -- cgit v1.2.3 From 0bc21296c9ef32412237a8cc0c8141d0226b9070 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 11 Apr 2017 15:16:39 -0700 Subject: [vcpkg] Alias out standard filesystem headers to ensure clean separation. --- toolsrc/src/commands_cache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'toolsrc/src/commands_cache.cpp') diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index 4c8690c1c..c7096b127 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -10,9 +10,8 @@ namespace vcpkg::Commands::Cache static std::vector read_all_binary_paragraphs(const VcpkgPaths& paths) { std::vector output; - for (auto it = fs::directory_iterator(paths.packages); it != fs::directory_iterator(); ++it) + for (auto&& path : paths.get_filesystem().non_recursive_find_all_files_in_dir(paths.packages)) { - const fs::path& path = it->path(); const Expected> pghs = Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); if (auto p = pghs.get()) { -- cgit v1.2.3 From bd01f8ce83a0f4fc1963471623971d55d7460972 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 12 Apr 2017 23:15:02 -0700 Subject: get_files_recursive()/get_files_non_recursive() --- toolsrc/src/commands_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_cache.cpp') diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index c7096b127..cb26c6ef9 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -10,7 +10,7 @@ namespace vcpkg::Commands::Cache static std::vector read_all_binary_paragraphs(const VcpkgPaths& paths) { std::vector output; - for (auto&& path : paths.get_filesystem().non_recursive_find_all_files_in_dir(paths.packages)) + for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.packages)) { const Expected> pghs = Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); if (auto p = pghs.get()) -- cgit v1.2.3