This is the reference documentation of module ALib System, which exposes it's entities in this namespace.
Type Index: | |
class | Console |
This class provides system dependent features in respect the console attached to a process. More... | |
struct | EnvironmentVariables |
class | Path |
class | ProcessInfo |
This class represents process information. More... | |
Type Definition Index: | |
using | CPathString = strings::TCString<PathCharType> |
The string-type used with this ALib Module. | |
using | PathCharType = std::filesystem::path::value_type |
using | PathString = strings::TString<PathCharType> |
The string-type used with this ALib Module. | |
using | PathStringMA = strings::TAString<PathCharType, PoolAllocator > |
A mono-allocated string representing a path. | |
using | PathStringPA = strings::TAString<PathCharType, PoolAllocator > |
A pool-allocated string representing a path. | |
using | PathSubstring = strings::TSubstring<PathCharType> |
The string-type used with this ALib Module. | |
Enumeration Index: | |
enum class | SystemErrors { UNKNOWN = -1 , OK = 0 , None = 0 , eperm = EPERM , enoent = ENOENT , esrch = ESRCH , eintr = EINTR , eio = EIO , enxio = ENXIO , e2Big = E2BIG , enoexec = ENOEXEC , ebadf = EBADF , echild = ECHILD , eagain = EAGAIN , enomem = ENOMEM , eacces = EACCES , efault = EFAULT , ebusy = EBUSY , eexist = EEXIST , exdev = EXDEV , enodev = ENODEV , enotdir = ENOTDIR , eisdir = EISDIR , enfile = ENFILE , emfile = EMFILE , enotty = ENOTTY , efbig = EFBIG , enospc = ENOSPC , espipe = ESPIPE , erofs = EROFS , emlink = EMLINK , epipe = EPIPE , edom = EDOM , edeadlk = EDEADLK , enametoolong = ENAMETOOLONG , enolck = ENOLCK , enosys = ENOSYS , enotempty = ENOTEMPTY , einval = EINVAL , erange = ERANGE , eilseq = EILSEQ , struncate = STRUNCATE , eaddrinuse = EADDRINUSE , eaddrnotavail = EADDRNOTAVAIL , eafnosupport = EAFNOSUPPORT , ealready = EALREADY , ebadmsg = EBADMSG , ecanceled = ECANCELED , econnaborted = ECONNABORTED , econnrefused = ECONNREFUSED , econnreset = ECONNRESET , edestaddrreq = EDESTADDRREQ , ehostunreach = EHOSTUNREACH , eidrm = EIDRM , einprogress = EINPROGRESS , eisconn = EISCONN , eloop = ELOOP , emsgsize = EMSGSIZE , enetdown = ENETDOWN , enetreset = ENETRESET , enetunreach = ENETUNREACH , enobufs = ENOBUFS , enodata = ENODATA , enolink = ENOLINK , enomsg = ENOMSG , enoprotoopt = ENOPROTOOPT , enosr = ENOSR , enostr = ENOSTR , enotconn = ENOTCONN , enotrecoverable = ENOTRECOVERABLE , enotsock = ENOTSOCK , enotsup = ENOTSUP , eopnotsupp = EOPNOTSUPP , eother = 131 , eoverflow = EOVERFLOW , eownerdead = EOWNERDEAD , eproto = EPROTO , eprotonosupport = EPROTONOSUPPORT , eprototype = EPROTOTYPE , etime = ETIME , etimedout = ETIMEDOUT , etxtbsy = ETXTBSY , ewouldblock = EWOULDBLOCK } |
enum class | SystemFolders { Root , Current , Home , HomeConfig , Module , Temp , VarTemp } |
Function Index: | |
Exception | CreateSystemException (const CallerInfo &ci, int errNo) |
Variable Index: | |
constexpr PathCharType | DIRECTORY_SEPARATOR = '/' |
The standard path separator character. Defaults to '\' on Windows OS, '/' else. | |
constexpr PathString | EMPTY_PATH |
An empty path string. | |
constexpr PathString | NULL_PATH |
A nulled path string. | |
using alib::system::PathCharType = std::filesystem::path::value_type |
|
strong |
Denotes result values returned by system functions (glibc, etc). In case module ALib Camp is included in the ALib Build, the enum record ERException is assigned and each error is resourced in the Basecamp. With that, these enums can be used as information entries in class Exception.
Definition at line 17 of file systemerrors.inl.
|
strong |
Enumerates special system folders like "home", "temp", "config", etc. This enumeration is primarily used with class Path and this documentation refers to this type.
Enumerator | |
---|---|
Root | The root directory . |
Current | The current directory of the process. |
Home | The user's home directory. |
HomeConfig | The user's configuration directory. This is evaluated as follows:
|
Module | The directory of the executable of the process. |
Temp | A directory to be used for creation of temporary files.
If the directory does not exist, then (on all OS), a new directory named
To overrule this behavior, public static variable Path::tempDirEvaluatedOnce may be set arbitrarily before using this enum value. |
VarTemp | A directory to be used for creation of temporary files that survives reboots of the host machine.
If the directory does not exist, then (on all OS), a new directory named
To overrule this behavior, public static variable Path::varTempDirEvaluatedOnce may be set arbitrarily before using this enum value. |
ALIB_DLL Exception alib::system::CreateSystemException | ( | const CallerInfo & | ci, |
int | errNo ) |
A Namespace function that creates an according Exception to a corresponding system error number.
The small challenge here is that arbitrary error numbers (of an unknown) type might occur, that do not have a corresponding enum record. In this case, SystemErrors::UNKNOWN is thrown and only the number is displayed in the description text.
ci | The source location of the exception creation. |
errNo | The system's error number. |
Definition at line 219 of file exception.cpp.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |