Faker C++
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <string>
5#include <string_view>
6
7#include "faker-cxx/export.h"
8
9namespace faker::system
10{
11enum class FileType
12{
14 Audio,
15 Image,
16 Text,
17 Video,
18};
19
20struct FAKER_CXX_EXPORT CronOptions
21{
22 bool includeYear = false;
23 bool includeNonStandard = false;
24};
25
26struct FAKER_CXX_EXPORT NetworkInterfaceOptions
27{
28 std::optional<std::string> interfaceType;
29 std::optional<std::string> interfaceSchema;
30};
31
43FAKER_CXX_EXPORT std::string fileName();
44
56FAKER_CXX_EXPORT std::string fileExtension(const std::optional<FileType>& mimeType = std::nullopt);
57
68FAKER_CXX_EXPORT std::string commonFileName();
69
79FAKER_CXX_EXPORT std::string_view commonFileExtension();
80
90FAKER_CXX_EXPORT std::string_view mimeType();
91
101FAKER_CXX_EXPORT std::string_view fileType();
102
112FAKER_CXX_EXPORT std::string_view directoryPath();
113
123FAKER_CXX_EXPORT std::string filePath();
124
134FAKER_CXX_EXPORT std::string semver();
135
162FAKER_CXX_EXPORT std::string networkInterface(const std::optional<NetworkInterfaceOptions>& options = {});
163
194FAKER_CXX_EXPORT std::string cron(const CronOptions& options = {});
195}
Definition system.h:10
FAKER_CXX_EXPORT std::string semver()
FAKER_CXX_EXPORT std::string filePath()
FAKER_CXX_EXPORT std::string fileName()
Returns a random file name with extension.
FAKER_CXX_EXPORT std::string_view commonFileExtension()
FAKER_CXX_EXPORT std::string_view directoryPath()
FAKER_CXX_EXPORT std::string commonFileName()
FAKER_CXX_EXPORT std::string networkInterface(const std::optional< NetworkInterfaceOptions > &options={})
FAKER_CXX_EXPORT std::string cron(const CronOptions &options={})
FAKER_CXX_EXPORT std::string_view fileType()
FAKER_CXX_EXPORT std::string_view mimeType()
FAKER_CXX_EXPORT std::string fileExtension(const std::optional< FileType > &mimeType=std::nullopt)
Returns a file extension.
FileType
Definition system.h:12
Definition system.h:21
std::optional< std::string > interfaceType
Definition system.h:28
std::optional< std::string > interfaceSchema
Definition system.h:29