Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
PathName.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
6
7 [[deprecated ("Since Stroika v3.0d12 - use String::As<filesystem::path>")]] inline filesystem::path ToPath (const String& p)
8 {
9 return p.As<filesystem::path> ();
10 }
11 [[deprecated ("Since Stroika v3.0d12 - use String::As<filesystem::path>")]] inline optional<filesystem::path> ToPath (const optional<String>& p)
12 {
13 if (p) {
14 return p->As<filesystem::path> ();
15 }
16 return nullopt;
17 }
18 [[deprecated ("Since Stroika v3.0d12 - use String CTOR")]] inline String FromPath (const filesystem::path& p)
19 {
20 return String{p};
21 }
22 [[deprecated ("Since Stroika v3.0d12 - use String CTOR??? revfisit if used...")]] inline optional<String> FromPath (const optional<filesystem::path>& p)
23 {
24 // unsure can deprecate???
25 if (p) {
26 return String{*p};
27 }
28 return nullopt;
29 }
30
31}