Faker C++
Toggle main menu visibility
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
9
namespace
faker::system
10
{
11
enum class
FileType
12
{
13
Application
,
14
Audio
,
15
Image
,
16
Text
,
17
Video
,
18
};
19
20
struct
FAKER_CXX_EXPORT
CronOptions
21
{
22
bool
includeYear
=
false
;
23
bool
includeNonStandard
=
false
;
24
};
25
26
struct
FAKER_CXX_EXPORT
NetworkInterfaceOptions
27
{
28
std::optional<std::string>
interfaceType
;
29
std::optional<std::string>
interfaceSchema
;
30
};
31
41
FAKER_CXX_EXPORT std::string
fileName
();
42
54
FAKER_CXX_EXPORT std::string
fileExtension
(
const
std::optional<FileType>&
mimeType
= std::nullopt);
55
65
FAKER_CXX_EXPORT std::string
commonFileName
();
66
76
FAKER_CXX_EXPORT std::string_view
commonFileExtension
();
77
87
FAKER_CXX_EXPORT std::string_view
mimeType
();
88
98
FAKER_CXX_EXPORT std::string_view
fileType
();
99
109
FAKER_CXX_EXPORT std::string_view
directoryPath
();
110
120
FAKER_CXX_EXPORT std::string
filePath
();
121
131
FAKER_CXX_EXPORT std::string
semver
();
132
159
FAKER_CXX_EXPORT std::string
networkInterface
(
const
std::optional<NetworkInterfaceOptions>& options = {});
160
191
FAKER_CXX_EXPORT std::string
cron
(
const
CronOptions
& options = {});
192
}
faker::system
Definition
system.h:10
faker::system::semver
FAKER_CXX_EXPORT std::string semver()
Returns a semantic version.
faker::system::filePath
FAKER_CXX_EXPORT std::string filePath()
Returns a file path.
faker::system::fileName
FAKER_CXX_EXPORT std::string fileName()
Returns a random file name with extension.
faker::system::commonFileExtension
FAKER_CXX_EXPORT std::string_view commonFileExtension()
Returns a commonly used file extension.
faker::system::directoryPath
FAKER_CXX_EXPORT std::string_view directoryPath()
Returns a directory path.
faker::system::commonFileName
FAKER_CXX_EXPORT std::string commonFileName()
Returns a random file name with a given extension or a commonly used extension.
faker::system::networkInterface
FAKER_CXX_EXPORT std::string networkInterface(const std::optional< NetworkInterfaceOptions > &options={})
Returns a random network interface.
faker::system::cron
FAKER_CXX_EXPORT std::string cron(const CronOptions &options={})
Returns a random cron expression.
faker::system::fileType
FAKER_CXX_EXPORT std::string_view fileType()
Returns a commonly used file type.
faker::system::mimeType
FAKER_CXX_EXPORT std::string_view mimeType()
Returns a mime-type.
faker::system::fileExtension
FAKER_CXX_EXPORT std::string fileExtension(const std::optional< FileType > &mimeType=std::nullopt)
Returns a file extension.
faker::system::FileType
FileType
Definition
system.h:12
faker::system::FileType::Video
@ Video
Definition
system.h:17
faker::system::FileType::Text
@ Text
Definition
system.h:16
faker::system::FileType::Audio
@ Audio
Definition
system.h:14
faker::system::FileType::Image
@ Image
Definition
system.h:15
faker::system::FileType::Application
@ Application
Definition
system.h:13
faker::system::CronOptions
Definition
system.h:21
faker::system::CronOptions::includeNonStandard
bool includeNonStandard
Definition
system.h:23
faker::system::CronOptions::includeYear
bool includeYear
Definition
system.h:22
faker::system::NetworkInterfaceOptions
Definition
system.h:27
faker::system::NetworkInterfaceOptions::interfaceType
std::optional< std::string > interfaceType
Definition
system.h:28
faker::system::NetworkInterfaceOptions::interfaceSchema
std::optional< std::string > interfaceSchema
Definition
system.h:29
include
faker-cxx
system.h
Generated by
1.17.0