Trouble creating a "Files" tab UI

I’m looking for tips on how to create a “Files” tab for my game menu. I’ve thought about the logic behind it, but I’m having a lot of trouble implementing it. The Files tab would obviously be a widget with a List View, and in the same widget, on the right side, the text corresponding to the file the player selects. What would be the smartest way to set this up? I was thinking of making a Data Table containing all the items, with the file name and its body text, and then every time the player acquires a new file, it would add a new row to the Data Table, something along those lines.

What is a “file”?

It depends on what you want to do with it.

I would have a datatable with all the files that can exist.

Then i would store in an array of fnames the rows for the files that the player has.

On the widget i can query the data table to show the info using that fname.

Ive made a foss plugin for an invontory that works pretty much like that.

Using an array of fnames to store the acquired ones allows you to implement a savegame easily.