code: def get_resource(self, p):
          
          for r in self.package['resources']:
              if r['relativepath'] == p:
                  r['localfullpath'] = os.path.join(self.rootdir, p)
                  return r
  
          raise Exception("Invalid path")
docs: Get metadata for a given file