code: def read(path, saltenv='base'):
      '''
      Read the contents of a text file, if the file is binary then
      '''
      # Return a dict of paths + content
      ret = []
      files = find(path, saltenv)
      for fn_ in files:
          full = next(six.iterkeys(fn_))
          form = fn_[full]
          if form == 'txt':
              with salt.utils.files.fopen(full, 'rb') as fp_:
                  ret.append(
                      {full: salt.utils.stringutils.to_unicode(fp_.read())}
                  )
      return ref read(path, saltenv='base'):
      '''
      Read the contents of a text file, if the file is binary then
      '''
      # Return a dict of paths + content
      ret = []
      files = find(path, saltenv)
      for fn_ in files:
          full = next(six.iterkeys(fn_))
          form = fn_[full]
          if form == 'txt':
              with salt.utils.files.fopen(full, 'rb') as fp_:
                  ret.append(
                      {full: salt.utils.stringutils.to_unicode(fp_.read())}
                  )
      return ret
docs: Read the contents of a text file, if the file is binary then