mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-03-13 23:57:13 +01:00
Add option to retrieve the real file path in the system path library.
This commit is contained in:
parent
8dacace7ae
commit
6da98330ca
@ -1674,6 +1674,12 @@ SysPath SysPath::Null()
|
|||||||
return SysPath(SysEnv::NullDir());
|
return SysPath(SysEnv::NullDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
SysPath SysPath::Real(CSStr path)
|
||||||
|
{
|
||||||
|
return SysPath(GetRealFilePath(path));
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
SysPath SysPath::With(const SysPath & parent, CSStr name)
|
SysPath SysPath::With(const SysPath & parent, CSStr name)
|
||||||
{
|
{
|
||||||
@ -1785,6 +1791,7 @@ void Register_SysPath(HSQUIRRELVM vm)
|
|||||||
.StaticFunc(_SC("Config"), &SysPath::Config)
|
.StaticFunc(_SC("Config"), &SysPath::Config)
|
||||||
.StaticFunc(_SC("System"), &SysPath::System)
|
.StaticFunc(_SC("System"), &SysPath::System)
|
||||||
.StaticFunc(_SC("Null"), &SysPath::Null)
|
.StaticFunc(_SC("Null"), &SysPath::Null)
|
||||||
|
.StaticFunc(_SC("Real"), &SysPath::Real)
|
||||||
.StaticFunc(_SC("With"), &SysPath::With)
|
.StaticFunc(_SC("With"), &SysPath::With)
|
||||||
.StaticFunc(_SC("Unix"), &SysPath::MakeUnix)
|
.StaticFunc(_SC("Unix"), &SysPath::MakeUnix)
|
||||||
.StaticFunc(_SC("Windows"), &SysPath::MakeWindows)
|
.StaticFunc(_SC("Windows"), &SysPath::MakeWindows)
|
||||||
|
@ -721,6 +721,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
static SysPath Null();
|
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
|
* Creates a path from a parent path and a file name. The parent path is expected to reference
|
||||||
* a directory.
|
* a directory.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user