1.1 --- a/core/smn_filesystem.cpp Thu Jan 25 04:36:48 2007 +0000
1.2 +++ b/core/smn_filesystem.cpp Thu Jan 25 04:37:23 2007 +0000
1.3 @@ -428,6 +428,18 @@
1.4 return 1;
1.5 }
1.6
1.7 +static cell_t sm_BuildPath(IPluginContext *pContext, const cell_t *params)
1.8 +{
1.9 + char path[PLATFORM_MAX_PATH], *fmt, *buffer;
1.10 + int arg = 4;
1.11 + pContext->LocalToString(params[2], &buffer);
1.12 + pContext->LocalToString(params[4], &fmt);
1.13 +
1.14 + atcprintf(path, sizeof(path), fmt, pContext, params, &arg);
1.15 +
1.16 + return g_SourceMod.BuildPath(Path_SM_Rel, buffer, params[3], "%s", path);
1.17 +}
1.18 +
1.19 static FileNatives s_FileNatives;
1.20
1.21 REGISTER_NATIVES(filesystem)
1.22 @@ -446,5 +458,6 @@
1.23 {"FileSize", sm_FileSize},
1.24 {"RemoveDir", sm_RemoveDir},
1.25 {"WriteFileLine", sm_WriteFileLine},
1.26 + {"BuildPath", sm_BuildPath},
1.27 {NULL, NULL},
1.28 };