#NEWLINE# def materialize_url( self , url , content = None , default_index_file = 'index.html' ) : #NEWLINE# #INDENT# url = url . lstrip ( '/' ) #NEWLINE# if ( not self . _guess_content_type ( url ) ) : #NEWLINE# #INDENT# log . warn ( "Materializing literal file of unknown content type: /%s  (Hint: Add '/' suffix to treat it as a directory)" , url ) #NEWLINE# #UNINDENT# log . info ( 'Materializing: /%s' , url ) #NEWLINE# ( url_path , index_file ) = self . _get_materialize_path ( url , default_index_file ) #NEWLINE# self . _prepare_dir ( url_path ) #NEWLINE# file_path = ( index_file and os . path . join ( url_path , self ) ) #NEWLINE# if ( ( not file_path ) or ( content is None ) ) : #NEWLINE# #INDENT# return url_path #NEWLINE# #UNINDENT# self . _write_file ( file_path , content ) #NEWLINE# return file_path