2020-02-12 09:12:29 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2019 Equinor ASA
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
#ifndef OPM_FILESYSTEM_HPP
|
|
|
|
|
#define OPM_FILESYSTEM_HPP
|
|
|
|
|
|
2020-02-14 09:38:33 +01:00
|
|
|
#if __cplusplus < 201703L || \
|
|
|
|
|
(defined(__GNUC__) && __GNUC__ < 8)
|
2020-02-12 09:12:29 +01:00
|
|
|
#include <experimental/filesystem>
|
2020-02-14 09:38:33 +01:00
|
|
|
#else
|
|
|
|
|
#include <filesystem>
|
2020-02-12 09:12:29 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Opm
|
|
|
|
|
{
|
2020-02-14 09:38:33 +01:00
|
|
|
#if __cplusplus < 201703L || \
|
|
|
|
|
(defined(__GNUC__) && __GNUC__ < 8)
|
2020-02-12 09:12:29 +01:00
|
|
|
namespace filesystem = std::experimental::filesystem;
|
2020-02-14 09:38:33 +01:00
|
|
|
#else
|
|
|
|
|
namespace filesystem = std::filesystem;
|
2020-02-12 09:12:29 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// A poor man's filesystem::unique_path
|
|
|
|
|
std::string unique_path(const std::string& input);
|
|
|
|
|
|
|
|
|
|
} // end namespace Opm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // OPM_FILESYSTEM_HPP
|