local FolderLoader = Object:extend() function FolderLoader.getAllDatas(value) local folderLoader = FolderLoader(value) return folderLoader:getDatas() end function FolderLoader:new(value) self.folder = "data/" .. value.folder self.data = {} self.data.nom = value.nom self.data.list = {} for _, filename in ipairs(utils.scandir(self.folder)) do print(filename) end end function FolderLoader:getDatas() return self.data end return FolderLoader