code: def from_disk_add_path(self, path=None, resource_list=None):
          
          # sanity
          if (path is None or resource_list is None or self.mapper is None):
              raise ValueError("Must specify path, resource_list and mapper")
          # is path a directory or a file? for each file: create Resource object,
          # add, increment counter
          if (sys.version_info < (3, 0)):
              path = path.decode('utf-8')
          if os.path.isdir(path):
              num_files = 0
              for dirpath, dirs, files in os.walk(path, topdown=True):
                  for file_in_dirpath in files:
                      num_files += 1
                      if (num_files % 50000 == 0):
                          self.logger.info(
                              "ResourceListBuilder.from_disk_add_path: %d files..." % (num_files))
                      self.add_file(resource_list=resource_list,
                                    dir=dirpath, file=file_in_dirpath)
                      # prune list of dirs based on self.exclude_dirs
                      for exclude in self.exclude_dirs:
                          if exclude in dirs:
                              self.logger.debug("Excluding dir %s" % (exclude))
                              dirs.remove(exclude)
          else:
              # single file
              self.add_file(resource_list=resource_list, file=path)
docs: Add to resource_list with resources from disk scan starting at path.