cli20 0.1.2
A C++20 typed-schema command-line parser
Loading...
Searching...
No Matches
cli::conversion::ExistingFile Struct Reference

Converts a string token to std::filesystem::path, requiring the path to exist and be a regular file. More...

#include <action.hh>

Public Types

template<class Input>
using after_type = std::filesystem::path
template<class Prev>
using storage_type = void

Public Member Functions

auto operator() (ActionCtx< void > ctx, ActionResult< std::string_view > input) const -> ActionResult< std::filesystem::path >

Static Public Attributes

template<class Input>
static constexpr bool accepts_input = Path::template accepts_input<Input>

Detailed Description

Converts a string token to std::filesystem::path, requiring the path to exist and be a regular file.

Returns ErrorCode::invalid_value if the path does not exist or is not a regular file.

Definition at line 825 of file action.hh.

Member Typedef Documentation

◆ after_type

template<class Input>
using cli::conversion::ExistingFile::after_type = std::filesystem::path

Definition at line 830 of file action.hh.

◆ storage_type

template<class Prev>
using cli::conversion::ExistingFile::storage_type = void

Definition at line 833 of file action.hh.

Member Function Documentation

◆ operator()()

auto cli::conversion::ExistingFile::operator() ( ActionCtx< void > ctx,
ActionResult< std::string_view > input ) const -> ActionResult< std::filesystem::path >
inline

Definition at line 835 of file action.hh.

Member Data Documentation

◆ accepts_input

template<class Input>
bool cli::conversion::ExistingFile::accepts_input = Path::template accepts_input<Input>
staticconstexpr

Definition at line 827 of file action.hh.


The documentation for this struct was generated from the following file: