Skip to content

Instantly share code, notes, and snippets.

@ohitsdaniel
Created August 17, 2022 16:25
Show Gist options
  • Save ohitsdaniel/904ed97d1fd6d18ba731730b5267f784 to your computer and use it in GitHub Desktop.
Save ohitsdaniel/904ed97d1fd6d18ba731730b5267f784 to your computer and use it in GitHub Desktop.
FileTree
struct FileTree {
let root: Folder
}
enum Node {
case folder(Folder)
case file(File)
}
struct Folder {
let nodes: [Node]
}
struct File {
let name: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment