#NEWLINE# def _load_state( self , config ) : #NEWLINE# #INDENT# '\n        Find all JSON-schema files in the directory structure\n        and save them in this state storage.\n        ' #NEWLINE# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# path = os . path . join ( config . apppath , 'bundles' ) #NEWLINE# folders = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( root , dirs , files ) in os . walk ( path ) : #NEWLINE# #INDENT# validations = filter ( ( lambda f : ( f == 'validations' ) ) , dirs ) #NEWLINE# folders . update ( dict ( ( ( f , [ ] ) for f in map ( ( lambda f : os . path . join ( root , f ) ) , root ) ) ) ) #NEWLINE# #UNINDENT# for ( k , folder ) in folders . items ( ) : #NEWLINE# #INDENT# for ( root , dirs , files ) in os . walk ( k ) : #NEWLINE# #INDENT# files = filter ( ( lambda f : f . endswith ( '.json' ) ) , files ) #NEWLINE# folder += map ( ( lambda f : os . path . join ( os . path . relpath ( root , k ) , f ) ) , files ) #NEWLINE# #UNINDENT# #UNINDENT# data [ 'directories' ] = folders #NEWLINE# return data