fmt::formatter< tec::Path >

fmtcore formatter for Paths for use with spdlog (or similar) Examples More...

#include <filesystem.hpp>

Public Functions

Name
constexpr auto parse(format_parse_context & ctx)
template <typename FormatContext >
auto
format(const tec::Path & p, FormatContext & ctx)

Public Attributes

Name
bool filename
bool fileex
bool relative
bool quote

Detailed Description

struct fmt::formatter< tec::Path >;

fmtcore formatter for Paths for use with spdlog (or similar) Examples

Path p{"/root/foo.bar"};
log->info("-> {}", p);    // -> /root/foo.bar
log->info("-> {:f}", p);  // -> foo.bar
log->info("-> {:fx}", p); // -> foo
log->info("-> {:x}", p);  // -> bar
log->info("-> {:r}", p);  // -> root/foo.bar
log->info("-> {:qr}", p); // -> "root/foo.bar"

Public Functions Documentation

function parse

inline constexpr auto parse(
    format_parse_context & ctx
)

function format

template <typename FormatContext >
inline auto format(
    const tec::Path & p,
    FormatContext & ctx
)

Public Attributes Documentation

variable filename

bool filename = false;

variable fileex

bool fileex = false;

variable relative

bool relative = false;

variable quote

bool quote = false;

Updated on 2022-07-24 at 19:27:35 +0000