def _check_file_exists(self, cfg_file):
cmd = "<STR_LIT>".format(cfg_file)<EOL>success_pattern = "<STR_LIT>".format(cfg_file)<EOL>output = self.device.send_command_expect(cmd)<EOL>if "<STR_LIT>" in output:<EOL><INDENT>return False<EOL><DEDENT>elif success_pattern in output:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
Check that the file exists on remote device using full path.

cfg_file is full path i.e. flash:/file_name

For example
# dir flash:/candidate_config.txt
Directory of flash:/candidate_config.txt

33  -rw-        5592  Dec 18 2015 10:50:22 -08:00  candidate_config.txt

return boolean