dynamically visualizing directory structures

Hello All!

I am looking for an easy way to allow users of my Shiny app (written in python Shiny Core) to select a particular folder in a series of directories. The directory structure goes experiment_name/job_id/geo_tag/scenario_id/*.

Is there a way for a user to select their "experiment_name" and have the options for "job_id" automatically filter themselves based on what job_ids are under that folder and the same for the folders below? I currently have a tree structure with parent and child nodes but can easily swap representations here.

I would prefer the method to be scalable to any depth of directories but a hard coded 4 solution also works fine.

I have been stuck trying to figure this out for some time so any help would be appreciated!