1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 09:57:14 +01:00

Add option to retrieve the real file path in the system path library.

This commit is contained in:
Sandu Liviu Catalin 2016-09-04 00:49:32 +03:00
parent 8dacace7ae
commit 6da98330ca
2 changed files with 12 additions and 0 deletions

View File

@ -1674,6 +1674,12 @@ SysPath SysPath::Null()
return SysPath(SysEnv::NullDir());
}
// ------------------------------------------------------------------------------------------------
SysPath SysPath::Real(CSStr path)
{
return SysPath(GetRealFilePath(path));
}
// ------------------------------------------------------------------------------------------------
SysPath SysPath::With(const SysPath & parent, CSStr name)
{
@ -1785,6 +1791,7 @@ void Register_SysPath(HSQUIRRELVM vm)
.StaticFunc(_SC("Config"), &SysPath::Config)
.StaticFunc(_SC("System"), &SysPath::System)
.StaticFunc(_SC("Null"), &SysPath::Null)
.StaticFunc(_SC("Real"), &SysPath::Real)
.StaticFunc(_SC("With"), &SysPath::With)
.StaticFunc(_SC("Unix"), &SysPath::MakeUnix)
.StaticFunc(_SC("Windows"), &SysPath::MakeWindows)

View File

@ -721,6 +721,11 @@ public:
*/
static SysPath Null();
/* --------------------------------------------------------------------------------------------
* Returns the real path to the specified file or directory.
*/
static SysPath Real(CSStr path);
/* --------------------------------------------------------------------------------------------
* Creates a path from a parent path and a file name. The parent path is expected to reference
* a directory.