Make streams and vfs and http shared_ptr

This commit is contained in:
2025-09-29 02:22:27 -05:00
parent 71d0e36a5c
commit d785508571
61 changed files with 541 additions and 951 deletions

View File

@@ -124,7 +124,7 @@ namespace Tesses::Framework::Platform::Environment
if(!realPath.relative) return realPath;
if(LocalFS.FileExists(realPath)) return realPath.MakeAbsolute();
if(LocalFS->FileExists(realPath)) return realPath.MakeAbsolute();
const char* path = std::getenv("PATH");
#if defined(_WIN32)
const char* pathext = std::getenv("PATHEXT");
@@ -134,13 +134,13 @@ namespace Tesses::Framework::Platform::Environment
for(auto item : pathParts)
{
auto newPath = LocalFS.SystemToVFSPath(item) / realPath;
auto newPath = LocalFS->SystemToVFSPath(item) / realPath;
for(auto item2 : pext)
{
auto newPathExt = newPath + item2;
if(LocalFS.FileExists(newPathExt)) return newPathExt;
if(LocalFS->FileExists(newPathExt)) return newPathExt;
}
if(LocalFS.FileExists(newPath)) return newPath;
if(LocalFS->FileExists(newPath)) return newPath;
}
return realPath;
#else
@@ -148,8 +148,8 @@ namespace Tesses::Framework::Platform::Environment
auto pathParts = HttpUtils::SplitString(path,":");
for(auto item : pathParts)
{
auto newPath = LocalFS.SystemToVFSPath(item) / realPath;
if(LocalFS.FileExists(newPath)) return newPath;
auto newPath = LocalFS->SystemToVFSPath(item) / realPath;
if(LocalFS->FileExists(newPath)) return newPath;
}
return realPath.MakeAbsolute();
#endif