StormByte-System 2.0.0
C++26 process and environment module of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::System::Directory Namespace Reference

Directory locations of this process or user. More...

Enumerations

enum class  Error { Success = 0 , Permission , NotFound , Failed }
 Directory enumerators. More...
 

Functions

StormByte::Error::Fault LastError () noexcept
 Last Directory error on this thread.
 
bool Current (StormByte::String::String &path)
 Current working directory.
 
bool Home (StormByte::String::String &path)
 Current user home directory.
 
bool Temporary (StormByte::String::String &path)
 Directory used for temporary files.
 
bool CurrentExecutable (StormByte::String::String &path)
 Directory that contains the running executable.
 

Detailed Description

Directory locations of this process or user.

Each call returns true on success and updates LastError for this thread. An output String is valid only when the call returned true.

Enumeration Type Documentation

◆ Error

Directory enumerators.

Domain tag StormByte.System.Directory. Zero is success.

Enumerator
Success 

No error.

Permission 

The process may not read this directory.

NotFound 

The directory or a required environment value is missing.

Failed 

The platform call failed.

Function Documentation

◆ Current()

bool StormByte::System::Directory::Current ( StormByte::String::String &  path)

Current working directory.

Parameters
[out]pathAbsolute directory. Written only on success.
Returns
true if the directory was resolved.

◆ CurrentExecutable()

bool StormByte::System::Directory::CurrentExecutable ( StormByte::String::String &  path)

Directory that contains the running executable.

Parameters
[out]pathAbsolute directory. Written only on success.
Returns
true if the directory was resolved.

◆ Home()

bool StormByte::System::Directory::Home ( StormByte::String::String &  path)

Current user home directory.

Parameters
[out]pathAbsolute directory. Written only on success.
Returns
true if the directory was resolved.

◆ LastError()

StormByte::Error::Fault StormByte::System::Directory::LastError ( )
noexcept

Last Directory error on this thread.

Returns
Success or an Error code. Stored in the System module TLS.

◆ Temporary()

bool StormByte::System::Directory::Temporary ( StormByte::String::String &  path)

Directory used for temporary files.

Parameters
[out]pathAbsolute directory. Written only on success.
Returns
true if the directory was resolved.