(self, original, new_name, overwrite)
overwrite is either True or False
overwrite is either True or False
overwrite is either True or False
def _setup_copy(self, original, new_name, overwrite):
        '''overwrite is either True or False'''
        def __dir_or_file(mode, new_name, overwrite):
            exist = isdir(new_name) if mode == 'dir' else isfile(new_name)
            if not exist or overwrite:
                self._init_thread(mode, original, new_name)
            else:
                self.errors.update({new_name: original})
        if isdir(original):
            __dir_or_file('dir', new_name, overwrite)
        else:
            __dir_or_file('file', new_name, overwrite)
def _setup_copy ( self , original , new_name , overwrite ) : def __dir_or_file ( mode , new_name , overwrite ) : exist = isdir ( new_name ) if mode == 'dir' else isfile ( new_name ) if not exist or overwrite : self . _init_thread ( mode , original , new_name ) else : self . errors . update ( { new_name : original } ) if isdir ( original ) : __dir_or_file ( 'dir' , new_name , overwrite ) else : __dir_or_file ( 'file' , new_name , overwrite )