def get_dir(path, dest, saltenv='base'):
 src = __context__['fileclient'].cache_dir(path, saltenv, cachedir=os.path.join('salt-ssh', __salt__.kwargs['id_']))
 src = ' '.join(src)
 single = salt.client.ssh.Single(__opts__, '', **__salt__.kwargs)
 ret = single.shell.send(src, dest)
 return (not ret[2])

def get_dir ( path , dest , saltenv = 'base' ) : src = __context__ [ 'fileclient' ] . cache_dir ( path , saltenv , cachedir = os . path . join ( 'salt-ssh' , __salt__ . kwargs [ 'id_' ] ) ) src = ' ' . join ( src ) single = salt . client . ssh . Single ( __opts__ , '' , ** __salt__ . kwargs ) ret = single . shell . send ( src , dest ) return ( not ret [ 2 ] )
used to recursively copy a directory from the salt master cli example: .