def list_env(saltenv='base'):
 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 os.walk(f_root):
   sub = ret[f_root]
   if (root != f_root):
    sroot = root
    above = []
    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

def list_env ( saltenv = 'base' ) : 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 os . walk ( f_root ) : sub = ret [ f_root ] if ( root != f_root ) : sroot = root above = [ ] 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
return all of the file paths found in an environment .