def _xfer_file(self, source_file=None, source_config=None, dest_file=None, file_system=None,<EOL>TransferClass=FileTransfer):
if not source_file and not source_config:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not dest_file or not file_system:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if source_file:<EOL><INDENT>kwargs = dict(ssh_conn=self.device, source_file=source_file, dest_file=dest_file,<EOL>direction='<STR_LIT>', file_system=file_system)<EOL><DEDENT>elif source_config:<EOL><INDENT>kwargs = dict(ssh_conn=self.device, source_config=source_config, dest_file=dest_file,<EOL>direction='<STR_LIT>', file_system=file_system)<EOL><DEDENT>enable_scp = True<EOL>if self.inline_transfer:<EOL><INDENT>enable_scp = False<EOL><DEDENT>with TransferClass(**kwargs) as transfer:<EOL><INDENT>if transfer.check_file_exists() and transfer.compare_md5():<EOL><INDENT>msg = "<STR_LIT>"<EOL>return (True, msg)<EOL><DEDENT>if not transfer.verify_space_available():<EOL><INDENT>msg = "<STR_LIT>"<EOL>return (False, msg)<EOL><DEDENT>if enable_scp:<EOL><INDENT>transfer.enable_scp()<EOL><DEDENT>transfer.transfer_file()<EOL>if transfer.verify_file():<EOL><INDENT>msg = "<STR_LIT>"<EOL>return (True, msg)<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>"<EOL>return (False, msg)<EOL><DEDENT>return (False, '<STR_LIT>')<EOL><DEDENT>
Transfer file to remote device.

        By default, this will use Secure Copy if self.inline_transfer is set, then will use
        Netmiko InlineTransfer method to transfer inline using either SSH or telnet (plus TCL
        onbox).

        Return (status, msg)
        status = boolean
        msg = details on what happened