4#include "Stroika/Foundation/StroikaPreComp.h"
13using namespace Stroika::Foundation::IO;
24Characters::String FileSystem::Exception::mkMsg_ (error_code errCode,
const path& p1,
const path& p2)
27 if (
not p1.empty ()) {
30 if (
not p2.empty ()) {
38 StringBuilder sb = Execution::Private_::SystemErrorExceptionPrivate_::mkCombinedMsg_ (errCode, message);
39 if (not p1.empty ()) {
40 sb <<
" {"sv <<
String{p1.wstring ()}.
LimitLength (25, StringShorteningPreference::ePreferKeepRight) <<
"}"sv;
42 if (not p2.empty ()) {
43 sb <<
" {"sv <<
String{p2.wstring ()}.
LimitLength (25, StringShorteningPreference::ePreferKeepRight) <<
"}"sv;
50#if USE_NOISY_TRACE_IN_THIS_MODULE_
54#if qStroika_Foundation_Common_Platform_POSIX
64#if USE_NOISY_TRACE_IN_THIS_MODULE_
74#if qStroika_Foundation_Common_Platform_POSIX
76#elif qStroika_Foundation_Common_Platform_Windows
Similar to String, but intended to more efficiently construct a String. Mutable type (String is large...
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual String LimitLength(size_t maxLen, StringShorteningPreference keepPref=StringShorteningPreference::ePreferKeepLeft) const
return the first maxLen (or fewer if string shorter) characters of this string (adding ellipsis if tr...
static void ThrowPOSIXErrNo(errno_t errNo, const path &p1={}, const path &p2={})
treats errNo as a POSIX errno value, and throws a FileSystem::Exception (subclass of @std::filesystem...
static void ThrowSystemErrNo(int sysErr, const path &p1={}, const path &p2={})
treats errNo as a platform-defined error number, and throws a FileSystem::Exception (subclass of @std...