diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-29 18:08:53 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-30 13:38:42 -0800 |
| commit | 0042316c4b57cf91ded8e474a8dda354340e7381 (patch) | |
| tree | b328767cab72afa547e9d06c5662f56fc5cfac21 /toolsrc/include | |
| parent | 5815a102389e84fd1bc6a6d7865ab0459d7c7a9f (diff) | |
| download | vcpkg-0042316c4b57cf91ded8e474a8dda354340e7381.tar.gz vcpkg-0042316c4b57cf91ded8e474a8dda354340e7381.zip | |
Introduce filesystem_fs.h
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/BuildInfo.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/Paragraphs.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/coff_file_reader.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/filesystem_fs.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_Files.h | 10 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_System.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_paths.h | 4 |
8 files changed, 14 insertions, 22 deletions
diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 7c654d9c7..9f872385e 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -4,8 +4,6 @@ #include "Paragraphs.h" #include <regex> -namespace fs = std::tr2::sys; - namespace vcpkg { namespace PostBuildLint { enum class LinkageType diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 22aaefe98..9e9fafe49 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -1,11 +1,10 @@ #pragma once -#include <filesystem> +#include "filesystem_fs.h" #include <unordered_map> namespace vcpkg { namespace Paragraphs { - namespace fs = std::tr2::sys; std::vector<std::unordered_map<std::string, std::string>> get_paragraphs(const fs::path& control_path); std::vector<std::unordered_map<std::string, std::string>> parse_paragraphs(const std::string& str); }} diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h index 81f107f10..1a9a071ef 100644 --- a/toolsrc/include/coff_file_reader.h +++ b/toolsrc/include/coff_file_reader.h @@ -1,12 +1,10 @@ #pragma once #include <vector> #include "MachineType.h" -#include <filesystem> +#include "filesystem_fs.h" namespace vcpkg {namespace COFFFileReader { - namespace fs = std::tr2::sys; - struct dll_info { MachineType machine_type; diff --git a/toolsrc/include/filesystem_fs.h b/toolsrc/include/filesystem_fs.h new file mode 100644 index 000000000..ece485c23 --- /dev/null +++ b/toolsrc/include/filesystem_fs.h @@ -0,0 +1,5 @@ +#pragma once + +#include <filesystem> + +namespace fs = std::tr2::sys;
\ No newline at end of file diff --git a/toolsrc/include/vcpkg.h b/toolsrc/include/vcpkg.h index 81b4d45ba..832fb1920 100644 --- a/toolsrc/include/vcpkg.h +++ b/toolsrc/include/vcpkg.h @@ -1,6 +1,5 @@ #pragma once -#include <filesystem> #include "package_spec.h" #include "BinaryParagraph.h" #include "StatusParagraphs.h" @@ -8,8 +7,6 @@ namespace vcpkg { - namespace fs = std::tr2::sys; - extern bool g_do_dry_run; StatusParagraphs database_load_check(const vcpkg_paths& paths); diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index 8ed1eabe1..aa25d8333 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -1,22 +1,20 @@ #pragma once #include "expected.h" -#include <filesystem> +#include "filesystem_fs.h" #include <iterator> namespace vcpkg {namespace Files { - namespace fs = std::tr2::sys; - static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)"; - void check_is_directory(const std::tr2::sys::path& dirpath); + void check_is_directory(const fs::path& dirpath); bool has_invalid_chars_for_filesystem(const std::string s); - expected<std::string> get_contents(const std::tr2::sys::path& file_path) noexcept; + expected<std::string> get_contents(const fs::path& file_path) noexcept; - std::tr2::sys::path find_file_recursively_up(const std::tr2::sys::path& starting_dir, const std::string& filename); + fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename); template <class Pred> void non_recursive_find_matching_paths_in_dir(const fs::path& dir, const Pred predicate, std::vector<fs::path>* output) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index c420464c1..e059bde0a 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -1,12 +1,11 @@ #pragma once #include "vcpkg_Strings.h" - -#include <filesystem> +#include "filesystem_fs.h" namespace vcpkg {namespace System { - std::tr2::sys::path get_exe_path_of_current_process(); + fs::path get_exe_path_of_current_process(); struct exit_code_and_output { diff --git a/toolsrc/include/vcpkg_paths.h b/toolsrc/include/vcpkg_paths.h index 2dc9c7636..a2932070d 100644 --- a/toolsrc/include/vcpkg_paths.h +++ b/toolsrc/include/vcpkg_paths.h @@ -1,13 +1,11 @@ #pragma once -#include <filesystem> +#include "filesystem_fs.h" #include "expected.h" #include "package_spec.h" #include "BinaryParagraph.h" namespace vcpkg { - namespace fs = std::tr2::sys; - struct vcpkg_paths { static expected<vcpkg_paths> create(const fs::path& vcpkg_root_dir); |
