![]() |
Faker C++
|
Classes | |
| struct | CronOptions |
| struct | NetworkInterfaceOptions |
Enumerations | |
| enum class | FileType { Application , Audio , Image , Text , Video } |
Functions | |
| FAKER_CXX_EXPORT std::string | fileName () |
| Returns a random file name with extension. | |
| FAKER_CXX_EXPORT std::string | fileExtension (const std::optional< FileType > &mimeType=std::nullopt) |
| Returns a file extension. | |
| FAKER_CXX_EXPORT std::string | commonFileName () |
| Returns a random file name with a given extension or a commonly used extension. | |
| FAKER_CXX_EXPORT std::string_view | commonFileExtension () |
| Returns a commonly used file extension. | |
| FAKER_CXX_EXPORT std::string_view | mimeType () |
| Returns a mime-type. | |
| FAKER_CXX_EXPORT std::string_view | fileType () |
| Returns a commonly used file type. | |
| FAKER_CXX_EXPORT std::string_view | directoryPath () |
| Returns a directory path. | |
| FAKER_CXX_EXPORT std::string | filePath () |
| Returns a file path. | |
| FAKER_CXX_EXPORT std::string | semver () |
| Returns a semantic version. | |
| FAKER_CXX_EXPORT std::string | networkInterface (const std::optional< NetworkInterfaceOptions > &options={}) |
| Returns a random network interface. | |
| FAKER_CXX_EXPORT std::string | cron (const CronOptions &options={}) |
| Returns a random cron expression. | |
|
strong |
| FAKER_CXX_EXPORT std::string_view faker::system::commonFileExtension | ( | ) |
Returns a commonly used file extension.
| FAKER_CXX_EXPORT std::string faker::system::commonFileName | ( | ) |
Returns a random file name with a given extension or a commonly used extension.
| FAKER_CXX_EXPORT std::string faker::system::cron | ( | const CronOptions & | options = {} | ) |
Returns a random cron expression.
| options | The options to use. Defaults to an empty options structure |
| options.includeYear | Whether to include a year in the generated expression. Defaults to `false`. |
| options.includeNonStandard | Whether to include a @yearly, @monthly, @daily, etc text labels in the generated expression. Defaults to `false`. |
| FAKER_CXX_EXPORT std::string_view faker::system::directoryPath | ( | ) |
Returns a directory path.
| FAKER_CXX_EXPORT std::string faker::system::fileExtension | ( | const std::optional< FileType > & | mimeType = std::nullopt | ) |
Returns a file extension.
| mimeType | value of MimeType enum. |
| FAKER_CXX_EXPORT std::string faker::system::fileName | ( | ) |
Returns a random file name with extension.
| FAKER_CXX_EXPORT std::string faker::system::filePath | ( | ) |
Returns a file path.
| FAKER_CXX_EXPORT std::string_view faker::system::fileType | ( | ) |
Returns a commonly used file type.
| FAKER_CXX_EXPORT std::string_view faker::system::mimeType | ( | ) |
Returns a mime-type.
| FAKER_CXX_EXPORT std::string faker::system::networkInterface | ( | const std::optional< NetworkInterfaceOptions > & | options = {} | ) |
Returns a random network interface.
| options | The options to use. Defaults to an empty options structure |
| options.interfaceType | The interface type. Can be one of `en`, `wl`, `ww`. |
| options.interfaceSchema | The interface schema. Can be one of `index`, `slot`, `mac`, `pci`. |
| FAKER_CXX_EXPORT std::string faker::system::semver | ( | ) |
Returns a semantic version.