FileManager Data Binding to Flat Data
This article explains how to bind the FileManager for Blazor to flat data. Before continuing, make sure you are familiar with the FileManager data binding basics.
Flat data means that the entire collection of FileManager items (both files and directories) is available at one level, for example List<FlatFileEntry>.
The parent-child relationships are created through internal data in the model - the ParentId field which points to the Id of the item that will contain the current item. The root level has null for ParentId. There must be at least one node with a null value so that the FileManager renders anything.
You must also provide the correct value for the HasDirectories field - for the directories that have subdirectories, you must set it to true, so that the expand arrow is rendered.
Example of flat data in a FileManager