#NEWLINE# def copy_stored_file( src_path , dest_path , storage = default_storage , chunk_size = DEFAULT_CHUNK_SIZE ) : #NEWLINE# #INDENT# '\n    Copy one storage path to another storage path.\n\n    Each path will be managed by the same storage implementation.\n    ' #NEWLINE# if ( src_path == dest_path ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# with storage . open ( src_path , 'rb' ) as src : #NEWLINE# #INDENT# with storage . open ( dest_path , 'wb' ) as dest : #NEWLINE# #INDENT# done = False #NEWLINE# while ( not done ) : #NEWLINE# #INDENT# chunk = src . read ( src_path ) #NEWLINE# if ( chunk != '' ) : #NEWLINE# #INDENT# dest . write ( chunk ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# done = True