Help with a stupid mistake

So I’ve been hosting a gmod server for around 2 months now and have learned a ton. But I’m still suffering from sloppy mistakes I made in the past when I was first learning.
Like I just realized that I made a .lua file somewhere with tons of (resource.AddFile) commands in it. And now I can’t find where I put it-
even though I don’t want people to download those files anymore. Is there anyway I could track what files are telling people to download stuff? In the console or by other means.
I realize that it’s a pretty ridiculous request but I’ve got my fingers crossed.

Looked in lua/autorun ?

If you have an intelligent code editor, such as Notepad++ or Sublime Text, those have a “Find in files” function, usually accessible with the Ctrl+Shift+F shortcut. Select the server’s directory and search for “resource.AddFile”.
If you don’t have an intelligent code editor, try the normal Windows search. There’s a small chance it’ll find it too - depends on how it’s configured.

Aaanddd…
A crazy solution.
Put this Lua script in garrysmod/autorun/server/, start the server and use the WhereAreTheResources concommand, it should print you the files where resource.AddFile is called from to console.
(Didn’t test it but it should work just fine.)

[lua]
local KnownSources = {};
local oldAddFile = resource.AddFile;

function resource.AddFile(…)
local dbgInfo = debug.getinfo(1);
KnownSources[dbgInfo.source] = true;

 return oldAddFile(...);

end;

concommand.Add(“WhereAreTheResources”, function()
for file, boo in pairs(KnownSources) do
print(file)
end
end);
[/lua]

Tried that, it was calling up the lua file fine. But didn’t seem to print anything.

Weird, then there’s no resource.AddFile call or my code doesn’t work :v:
Try this.

[lua]
local KnownSources = {};
local oldAddFile = resource.AddSingleFile;

function resource.AddSingleFile(…)
local dbgInfo = debug.getinfo(1);
KnownSources[dbgInfo.source] = true;

 return oldAddFile(...);

end;

concommand.Add(“WhereAreTheResources”, function()
for file, boo in pairs(KnownSources) do
print(file)
end
end);
[/lua]

Would anyone know where to download notepad ++?

Why are you so lazy?

That’s a joke right???