An abstract base class for the file and directory validators.
More...
#include <seqan3/argument_parser/validators.hpp>
|
using | option_value_type = std::string |
| Type of values that are tested by validator.
|
|
An abstract base class for the file and directory validators.
- Template Parameters
-
file_t | The type of the file to get the valid extensions for; void on default. |
This class provides a common interface for seqan3::input_file_validator and the seqan3::output_file_validator as well as the seqan3::input_directory_validator and seqan3::output_directory_validator.
The type can be further specialised for the seqan3::input_file_validator and the seqan3::output_file_validator using the template argument to determine the valid extensions from the given file type.
◆ ~file_validator_base() [no-api]
virtual seqan3::file_validator_base::~file_validator_base |
( |
| ) |
|
|
no-apivirtualdefault |
◆ case_insensitive_string_ends_with() [no-api]
Helper function that checks if a string is a suffix of another string. Case insensitive.
- Parameters
-
str | The string to be searched. |
suffix | The suffix to be searched for. |
- Returns
true
if suffix
is a suffix of str
, otherwise false
.
◆ operator()() [1/2] [no-api]
template<std::ranges::forward_range range_type>
void seqan3::file_validator_base::operator() |
( |
range_type const & |
v | ) |
const |
|
no-apiinline |
Tests whether every path in list v
passes validation. See operator()(option_value_type const & value) for further information.
- Template Parameters
-
range_type | The type of range to check; must model std::ranges::forward_range and the value type must be convertible to std::filesystem::path. |
- Parameters
-
v | The input range to iterate over and check every element. |
- Exceptions
-
◆ operator()() [2/2] [no-api]
◆ validate_filename() [no-api]
Validates the given filename path based on the specified extensions.
- Parameters
-
- Exceptions
-
◆ validate_readability() [no-api]
Checks if the given path is readable.
- Parameters
-
- Returns
true
if readable, otherwise false
.
- Exceptions
-
◆ validate_writeability() [no-api]
Checks if the given path is writable.
- Parameters
-
- Returns
true
if writable, otherwise false
.
- Exceptions
-
The documentation for this class was generated from the following file: