#NEWLINE# def find_file( self , path , saltenv , back = None ) : #NEWLINE# #INDENT# '\n        Find the path and return the fnd structure, this structure is passed\n        to other backend interfaces.\n        ' #NEWLINE# back = self . _gen_back ( back ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# fnd = { #NEWLINE# #INDENT# 'path' : '' , #NEWLINE# 'rel' : '' , #NEWLINE# #UNINDENT# } #NEWLINE# if os . path . isabs ( path ) : #NEWLINE# #INDENT# return fnd #NEWLINE# #UNINDENT# if ( '../' in path ) : #NEWLINE# #INDENT# return fnd #NEWLINE# #UNINDENT# if salt . utils . url . is_escaped ( path ) : #NEWLINE# #INDENT# path = salt . utils . url . unescape ( path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( '?' in path ) : #NEWLINE# #INDENT# hcomps = path . split ( '?' ) #NEWLINE# path = hcomps [ 0 ] #NEWLINE# comps = hcomps [ 1 ] . split ( '&' ) #NEWLINE# for comp in comps : #NEWLINE# #INDENT# if ( '=' not in comp ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# args = comp . split ( '=' , 1 ) #NEWLINE# kwargs [ args [ 0 ] ] = args [ 1 ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( 'env' in kwargs ) : #NEWLINE# #INDENT# salt . utils . warn_until ( 'Oxygen' , "Parameter 'env' has been detected in the argument list.  This parameter is no longer used and has been replaced by 'saltenv' as of Salt Carbon.  This warning will be removed in Salt Oxygen." ) #NEWLINE# kwargs . pop ( 'env' ) #NEWLINE# #UNINDENT# if ( 'saltenv' in kwargs ) : #NEWLINE# #INDENT# saltenv = kwargs . pop ( 'saltenv' ) #NEWLINE# #UNINDENT# if ( not isinstance ( saltenv , six . string_types ) ) : #NEWLINE# #INDENT# saltenv = six . text_type ( hcomps ) #NEWLINE# #UNINDENT# for fsb in back : #NEWLINE# #INDENT# fstr = '{0}.find_file' . format ( fsb ) #NEWLINE# if ( fstr in self . servers ) : #NEWLINE# #INDENT# fnd = self . servers [ fstr ] ( path , saltenv , ** kwargs ) #NEWLINE# if fnd . get ( 'path' ) : #NEWLINE# #INDENT# fnd [ 'back' ] = fsb #NEWLINE# return fnd #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return fnd