populate an object by recursively loading files