Using IFileSystem on srcds not working the same as game client

I’ve been slowly working on a set of tools for GMod devs and one incorporates a raw IO module that utilizes IFileSystem from the engine. I already have it working 100% on the SERVER and CLIENT states when using it on the game client. When trying to use the module on srcds the module interface returned in C++ is useless. I noticed the filesystem_stdio.dll is not loaded by default in srcds and when I try to use it there are no search paths. I rather not try to manually initialize it since the code would have to be copied out of the mod source and maintained manually.

I’m currently using this to get my interface:



Sys_LoadInterface("FileSystem_Stdio", "VFileSystem022", NULL, (void**)&g_FileSystem);


Does anyone know if I just need to fetch the interface another way or use something else completely?
I’m surprised it is not just working because I’d assume this would be the defacto way to access the filesystem from the engine.

I also had this problem with gm_bass3. I fixed it with a workaround. I developed a source plugin that has a exposing function for the filesystem pointer.

Usage example: GMod_Modules/bassfilesys.cpp at master · Grocel/GMod_Modules · GitHub

Oh man Grocel, amazing. I was really hoping I didn’t have to write a Source plugin to fetch it. I had been looking at SoruceMod and MetaMod to see how they got it and wondered why the dedicated server’s IFileSystem interface is not used the same way.

Thank you so much!