1.1 --- a/core/CoreConfig.cpp Fri Jul 27 15:45:15 2007 +0000
1.2 +++ b/core/CoreConfig.cpp Fri Jul 27 18:24:09 2007 +0000
1.3 @@ -200,7 +200,7 @@
1.4 sizeof(build)-len,
1.5 "/%s",
1.6 cur_ptr);
1.7 - if (!g_LibSys.CreateDirectory(build))
1.8 + if (!g_LibSys.CreateFolder(build))
1.9 {
1.10 break;
1.11 }
2.1 --- a/core/systems/LibrarySys.cpp Fri Jul 27 15:45:15 2007 +0000
2.2 +++ b/core/systems/LibrarySys.cpp Fri Jul 27 18:24:09 2007 +0000
2.3 @@ -349,7 +349,7 @@
2.4 return NULL;
2.5 }
2.6
2.7 -bool LibrarySystem::CreateDirectory(const char *path)
2.8 +bool LibrarySystem::CreateFolder(const char *path)
2.9 {
2.10 #if defined PLATFORM_WINDOWS
2.11 return (mkdir(path) != -1);
3.1 --- a/core/systems/LibrarySys.h Fri Jul 27 15:45:15 2007 +0000
3.2 +++ b/core/systems/LibrarySys.h Fri Jul 27 18:24:09 2007 +0000
3.3 @@ -75,7 +75,7 @@
3.4 void GetPlatformError(char *error, size_t maxlength);
3.5 size_t PathFormat(char *buffer, size_t len, const char *fmt, ...);
3.6 const char *GetFileExtension(const char *filename);
3.7 - bool CreateDirectory(const char *path);
3.8 + bool CreateFolder(const char *path);
3.9 size_t GetFileFromPath(char *buffer, size_t maxlength, const char *path);
3.10 };
3.11
4.1 --- a/public/ILibrarySys.h Fri Jul 27 15:45:15 2007 +0000
4.2 +++ b/public/ILibrarySys.h Fri Jul 27 18:24:09 2007 +0000
4.3 @@ -29,7 +29,7 @@
4.4 namespace SourceMod
4.5 {
4.6 #define SMINTERFACE_LIBRARYSYS_NAME "ILibrarySys"
4.7 - #define SMINTERFACE_LIBRARYSYS_VERSION 2
4.8 + #define SMINTERFACE_LIBRARYSYS_VERSION 3
4.9
4.10 class ILibrary
4.11 {
4.12 @@ -181,6 +181,14 @@
4.13 * @return Pointer to file extension.
4.14 */
4.15 virtual const char *GetFileExtension(const char *filename) =0;
4.16 +
4.17 + /**
4.18 + * @brief Creates a directory.
4.19 + *
4.20 + * @param path Full, absolute path of the directory to create.
4.21 + * @return True on success, false otherwise.
4.22 + */
4.23 + virtual bool CreateFolder(const char *path) =0;
4.24 };
4.25 }
4.26
5.1 --- a/public/sample_ext/sdk/smsdk_config.h Fri Jul 27 15:45:15 2007 +0000
5.2 +++ b/public/sample_ext/sdk/smsdk_config.h Fri Jul 27 18:24:09 2007 +0000
5.3 @@ -55,5 +55,6 @@
5.4 //#define SMEXT_ENABLE_GAMEHELPERS
5.5 //#define SMEXT_ENABLE_TIMERSYS
5.6 //#define SMEXT_ENABLE_THREADER
5.7 +//#define SMEXT_ENABLE_LIBSYS
5.8
5.9 #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
6.1 --- a/public/sample_ext/sdk/smsdk_ext.cpp Fri Jul 27 15:45:15 2007 +0000
6.2 +++ b/public/sample_ext/sdk/smsdk_ext.cpp Fri Jul 27 18:24:09 2007 +0000
6.3 @@ -63,6 +63,9 @@
6.4 #if defined SMEXT_ENABLE_THREADER
6.5 IThreader *threader = NULL;
6.6 #endif
6.7 +#if defined SMEXT_ENABLE_LIBSYS
6.8 +ILibrarySys *libsys = NULL;
6.9 +#endif
6.10
6.11 /** Exports the main interface */
6.12 PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
6.13 @@ -130,6 +133,9 @@
6.14 #if defined SMEXT_ENABLE_THREADER
6.15 SM_GET_IFACE(THREADER, threader);
6.16 #endif
6.17 +#if defined SMEXT_ENABLE_LIBSYS
6.18 + SM_GET_IFACE(LIBRARYSYS, libsys);
6.19 +#endif
6.20
6.21 if (SDK_OnLoad(error, maxlength, late))
6.22 {
7.1 --- a/public/sample_ext/sdk/smsdk_ext.h Fri Jul 27 15:45:15 2007 +0000
7.2 +++ b/public/sample_ext/sdk/smsdk_ext.h Fri Jul 27 18:24:09 2007 +0000
7.3 @@ -57,6 +57,9 @@
7.4 #if defined SMEXT_ENABLE_THREADER
7.5 #include <IThreader.h>
7.6 #endif
7.7 +#if defined SMEXT_ENABLE_LIBSYS
7.8 +#include <ILibrarySys.h>
7.9 +#endif
7.10
7.11 #if defined SMEXT_CONF_METAMOD
7.12 #include <ISmmPlugin.h>
7.13 @@ -237,6 +240,9 @@
7.14 #if defined SMEXT_ENABLE_THREADER
7.15 extern IThreader *threader;
7.16 #endif
7.17 +#if defined SMEXT_ENABLE_LIBSYS
7.18 +extern ILibrarySys *libsys;
7.19 +#endif
7.20
7.21 #if defined SMEXT_CONF_METAMOD
7.22 PLUGIN_GLOBALVARS();