#NEWLINE# def copy( self , new_path , raise_if_exists = False ) : #NEWLINE# #INDENT# if ( raise_if_exists and os . path . exists ( new_path ) ) : #NEWLINE# #INDENT# raise RuntimeError ( ( 'Destination exists: %s' % new_path ) ) #NEWLINE# #UNINDENT# tmp = LocalTarget ( ( new_path + ( '-luigi-tmp-%09d' % random . randrange ( 0 , 10000000000.0 ) ) ) , is_tmp = True ) #NEWLINE# tmp . makedirs ( ) #NEWLINE# shutil . copy ( self . path , tmp . fn ) #NEWLINE# tmp . move ( new_path )