/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2016 Danny Robson */ #ifndef CRUFT_UTIL_FIXUP_EXPERIMENTAL_FILESYSTEM_HPP #define CRUFT_UTIL_FIXUP_EXPERIMENTAL_FILESYSTEM_HPP #include /////////////////////////////////////////////////////////////////////////////// namespace std::experimental::filesystem { class path { public: using value_type = char; using string_type = std::basic_string; static constexpr value_type preferred_separator = '/'; path (); 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