recurses the directory for resources