code: def list_env(saltenv='base'):
      '''
      Return all of the file paths found in an environment
      '''
      ret = {}
      if saltenv not in __opts__['pillar_roots']:
          return ret
      for f_root in __opts__['pillar_roots'][saltenv]:
          ret[f_root] = {}
          for root, dirs, files in salt.utils.path.os_walk(f_root):
              sub = ret[f_root]
              if root != f_root:
                  # grab subroot ref
                  sroot = root
                  above = []
                  # Populate the above dict
                  while not os.path.samefile(sroot, f_root):
                      base = os.path.basename(sroot)
                      if base:
                          above.insert(0, base)
                      sroot = os.path.dirname(sroot)
                  for aroot in above:
                      sub = sub[aroot]
              for dir_ in dirs:
                  sub[dir_] = {}
              for fn_ in files:
                  sub[fn_] = 'f'
      return ref list_env(saltenv='base'):
      '''
      Return all of the file paths found in an environment
      '''
      ret = {}
      if saltenv not in __opts__['pillar_roots']:
          return ret
      for f_root in __opts__['pillar_roots'][saltenv]:
          ret[f_root] = {}
          for root, dirs, files in salt.utils.path.os_walk(f_root):
              sub = ret[f_root]
              if root != f_root:
                  # grab subroot ref
                  sroot = root
                  above = []
                  # Populate the above dict
                  while not os.path.samefile(sroot, f_root):
                      base = os.path.basename(sroot)
                      if base:
                          above.insert(0, base)
                      sroot = os.path.dirname(sroot)
                  for aroot in above:
                      sub = sub[aroot]
              for dir_ in dirs:
                  sub[dir_] = {}
              for fn_ in files:
                  sub[fn_] = 'f'
      return ret
docs: Return all of the file paths found in an environment