/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2016 Danny Robson */ #ifndef CRUFT_UTIL_FIXUP_EXPERIMENTAL_FILESYSTEM_HPP #define CRUFT_UTIL_FIXUP_EXPERIMENTAL_FILESYSTEM_HPP #include /////////////////////////////////////////////////////////////////////////////// namespace std::filesystem { class path { public: using value_type = char; using string_type = std::basic_string; static constexpr value_type preferred_separator = '/'; path (); explicit path (const path&); template path (const Source &s): m_path (s) { ; } template path (InputT first, InputT last): m_path (first, last) { ; } std::string string (void) const; const string_type& native (void) const; const value_type* c_str (void) const; path filename (void) const; path stem (void) const; path& operator/= (const path&); private: string_type m_path; }; path operator/ (const path&, const path&); bool operator== (const path&, const path&); //bool is_directory (file_status); bool is_directory (const path&); //bool is_directory (const path&, error_code&); template std::basic_ostream& operator<< (std::basic_ostream &os, const path &p) { return os << p.native (); } } #endif