def file_already_exists(self):
"""Check to see if there is a remote file with the same
name and md5 sum.
Returns:
``True`` if exists, ``False`` otherwise.
"""
if not self.remote_dir_exists:
return False
try:
dst_hash = self._get_remote_md5()
except NCError:
return False
src_hash = self._get_local_md5()
if src_hash == dst_hash:
return True
return False
评论列表
文章目录