Help on making something similar to pointshop

Hi, I want to make a shop, where there is a table of weapons, and items in the /gamemodename/items/ folder get added to that table.

So basically, here is a short question:
How do you create a table of weapons by looking through the items folder in the folder of the gamemode.

Bump, I wanna learn how to do this and reading the pointshop code gives me a headache