#ifndef CNOID_STDX_FILESYSTEM_HEADER
#define CNOID_STDX_FILESYSTEM_HEADER

#include <chrono>
#include <filesystem>

namespace std::filesystem {

[[deprecated("Use path::lexically_normal() member function instead")]]
inline path lexically_normal(const path& p){
    return p.lexically_normal();
}

[[deprecated("Use std::filesystem::last_write_time() and file_time_type instead")]]
inline std::time_t last_write_time_to_time_t(const path& p){
    return std::chrono::duration_cast<std::chrono::system_clock::duration>(
        last_write_time(p).time_since_epoch()).count();
}

}

namespace cnoid::stdx {
namespace filesystem = std::filesystem;
using error_code = std::error_code;
using copy_options = std::filesystem::copy_options;
}

#endif
