docs: def get_exclusions(path):
      """
      Generates exclusion patterns from a ``.dockerignore`` file located in the given path. Returns ``None`` if the
      file does not exist.
  
      :param path: Path to look up the ``.dockerignore`` in.
      :type path: unicode | str
      :return: List of patterns, that can be passed into :func:`get_filter_func`.
      :rtype: list[(__RegEx, bool)]
      """
      if not os.path.isdir(path):
          return None
      dockerignore_file = os.path.join(path, '.dockerignore')
      if not os.path.isfile(dockerignore_file):
          return None
      with open(dockerignore_file, 'rb') as dif:
          return list(preprocess_matches(dif.readlines()))