Create Directory and Files Like Structures inside Core Data

Viewed 101

Hi I am building application using Core Data to show Folder and Files Like Structure can any body tell how it can be achieved. Basic Structure example

Folder

-Folder 1

--Folder 1 1

--Folder 1 1 1

-File

-Folder 2

-File 1

-File2

For recently I have create a Model called Collections which has relation called collectionsParent and attributes as collection title.

Collections Entity

Then I create a outline view which iterate my collection and inside children I have added collectionsParent array

When I run the simulator my app crashes can anyone tell me what's wrong inside the code OutlineGroupView.Swift

OutlineGroup(folderArray(),children: \.collectionsParentChildren){
Text($0.collectionTitle!)
}

ContentView.Swift

List{
OutlineCollectionsView(collections: collections)
}

Your help will be highly appreciated and every suggestion are welcome

0 Answers
Related