Allow the user to get and set current path

This commit is contained in:
2025-04-29 06:28:31 -05:00
parent e853153008
commit e2392bd597
3 changed files with 43 additions and 0 deletions

View File

@ -1922,6 +1922,34 @@ namespace Tesses::CrossLang {
cse.back()->Push(gc, path.GetExtension());
return false;
}
if(cse.back()->env->GetRootEnvironment()->permissions.canRegisterLocalFS && key == "MakeAbsolute")
{
Tesses::Framework::Filesystem::VFSPath p;
if(GetArgumentAsPath(args,0,p))
{
cse.back()->Push(gc,path.MakeAbsolute(p));
return false;
}
else
{
cse.back()->Push(gc,path.MakeAbsolute());
return false;
}
}
if(cse.back()->env->GetRootEnvironment()->permissions.canRegisterLocalFS && key == "MakeRelative")
{
Tesses::Framework::Filesystem::VFSPath p;
if(GetArgumentAsPath(args,0,p))
{
cse.back()->Push(gc,path.MakeRelative(p));
return false;
}
else
{
cse.back()->Push(gc,path.MakeRelative());
return false;
}
}
if(key == "ChangeExtension")
{
Tesses::Framework::Filesystem::VFSPath newPath = path;