@@ -278,7 +278,6 @@ def download_project(
278278 local_dir : str ,
279279 filter_glob : str = None ,
280280 throw_on_error : bool = False ,
281- skip_existing : bool = False ,
282281 show_progress : bool = False ,
283282 ) -> List [Dict ]:
284283 """Download the specified project files into the destination dir.
@@ -298,7 +297,6 @@ def download_project(
298297 local_dir ,
299298 filter_glob ,
300299 throw_on_error ,
301- skip_existing ,
302300 show_progress ,
303301 )
304302
@@ -479,7 +477,6 @@ def download_files(
479477 local_dir : str ,
480478 filter_glob : str = None ,
481479 throw_on_error : bool = False ,
482- skip_existing : bool = False ,
483480 show_progress : bool = False ,
484481 ) -> List [Dict ]:
485482 """Download project files.
@@ -492,7 +489,6 @@ def download_files(
492489 filter_glob (str, optional): Download only files matching the glob pattern. If None download all. Defaults to None.
493490 throw_on_error (bool, optional): Throw if download error occurres. Defaults to False.
494491 show_progress (bool, optional): Show progress bar in the console. Defaults to False.
495- skip_existing (bool, optional): Skip files if they already exist locally with same sha256 hash. Defaults to False.
496492
497493 Raises:
498494 QFieldCloudException: if throw_on_error is True, throw an error if a download request fails.
@@ -508,19 +504,6 @@ def download_files(
508504 for file in files :
509505 if fnmatch .fnmatch (file ["name" ], filter_glob ):
510506 file ["status" ] = FileTransferStatus .PENDING
511-
512- local_filename = Path (f'{ local_dir } /{ file ["name" ]} ' )
513- if skip_existing and local_filename .exists ():
514-
515- sha256_hash = hashlib .sha256 ()
516- with open (local_filename , 'rb' ) as f :
517- for byte_block in iter (lambda : f .read (4096 ), b"" ):
518- sha256_hash .update (byte_block )
519-
520- if file ['sha256' ] == sha256_hash .hexdigest ():
521- logging .info (f'Skip file "{ file ["name" ]} " because it already exists locally' )
522- continue
523-
524507 files_to_download .append (file )
525508
526509 for file in files_to_download :
0 commit comments