parameters: (package: Package)
docstring: Return an iterable of entries in 'package'.
  
      Note that not all entries are resources.  Specifically, directories are
      not considered resources.  Use `is_resource()` on each entry returned here
      to check if it is a resource or not.
docstring_summary: Return an iterable of entries in 'package'.
docstring_tokens: Return an iterable of entries in package .
function: def contents(package: Package) -> Iterable[str]:
      """Return an iterable of entries in 'package'.
  
      Note that not all entries are resources.  Specifically, directories are
      not considered resources.  Use `is_resource()` on each entry returned here
      to check if it is a resource or not.
      """
      package = _get_package(package)
      reader = _get_resource_reader(package)
      if reader is not None:
          return reader.contents()
      # Is the package a namespace package?  By definition, namespace packages
      # cannot have resources.  We could use _check_location() and catch the
      # exception, but that's extra work, so just inline the check.
      elif package.__spec__.origin is None or not package.__spec__.has_location:
          return ()
      else:
          package_directory = Path(package.__spec__.origin).parent
          return os.listdir(package_directory)
function_tokens: def contents ( package : Package ) -> Iterable [ str ] : package = _get_package ( package ) reader = _get_resource_reader ( package ) if reader is not None : return reader . contents ( ) # Is the package a namespace package?  By definition, namespace packages # cannot have resources.  We could use _check_location() and catch the # exception, but that's extra work, so just inline the check. elif package . __spec__ . origin is None or not package . __spec__ . has_location : return ( ) else : package_directory = Path ( package . __spec__ . origin ) . parent return os . listdir ( package_directory )