Extract the code from ObjectStore.new that will commit the filled tree to the store into its own method so it can be used from a future method to snapshot trees at random points in time.
dir_fd
os.scandir()