def CopyFiles(rebalance, server_id):
 loc = data_store.DB.Location()
 if (not os.path.exists(loc)):
  return True
 if (not os.path.isdir(loc)):
  return True
 pool_cache = {}
 removed_list = []
 ok = _RecCopyFiles(rebalance, server_id, loc, '', pool_cache, removed_list)
 if (not ok):
  return False
 remove_file = _FileWithRemoveList(loc, rebalance)
 with open(remove_file, 'wb') as fp:
  for f in removed_list:
   fp.write((f.encode('utf8') + '\n'))
 return True

def CopyFiles ( rebalance , server_id ) : loc = data_store . DB . Location ( ) if ( not os . path . exists ( loc ) ) : return True if ( not os . path . isdir ( loc ) ) : return True pool_cache = { } removed_list = [ ] ok = _RecCopyFiles ( rebalance , server_id , loc , '' , pool_cache , removed_list ) if ( not ok ) : return False remove_file = _FileWithRemoveList ( loc , rebalance ) with open ( remove_file , 'wb' ) as fp : for f in removed_list : fp . write ( ( f . encode ( 'utf8' ) + '\n' ) ) return True
copies data store files to the corresponding data servers .