That's how I would do it. Why does it seem less than optimal? What do you mean by "best"?
In reply to Re: file tree to hash by chromatic in thread file tree to hash by Anonymous Monk