atomicshop 2.9.11__py3-none-any.whl → 2.9.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.9.11'
4
+ __version__ = '2.9.13'
atomicshop/filesystem.py CHANGED
@@ -387,19 +387,19 @@ def temporary_change_working_directory(new_working_directory: str) -> None:
387
387
  os.chdir(original_working_directory)
388
388
 
389
389
 
390
- def move_file(source_file_path: str, target_file_path: str, no_overwrite: bool = False) -> None:
390
+ def move_file(source_file_path: str, target_file_path: str, overwrite: bool = True) -> None:
391
391
  """
392
392
  The function moves file from source to target.
393
393
 
394
394
  :param source_file_path: string, full path to source file.
395
395
  :param target_file_path: string, full path to target file.
396
- :param no_overwrite: boolean, if 'True', then the function will not overwrite the file if it exists.
396
+ :param overwrite: boolean, if 'False', then the function will not overwrite the file if it exists.
397
397
 
398
398
  :return: None
399
399
  """
400
400
 
401
401
  # Check if 'no_overwrite' is set to 'True' and if the file exists.
402
- if no_overwrite:
402
+ if not overwrite:
403
403
  if check_file_existence(target_file_path):
404
404
  raise FileExistsError(f'File already exists: {target_file_path}')
405
405
 
@@ -407,10 +407,18 @@ def move_file(source_file_path: str, target_file_path: str, no_overwrite: bool =
407
407
  shutil.move(source_file_path, target_file_path)
408
408
 
409
409
 
410
- def move_files_from_folder_to_folder(source_directory: str, target_directory: str):
410
+ def move_files_from_folder_to_folder(
411
+ source_directory: str,
412
+ target_directory: str,
413
+ overwrite: bool = True
414
+ ):
411
415
  """
412
416
  The function is currently non-recursive and not tested with directories inside the source directories.
413
417
  The function will move all the files from source directory to target directory overwriting existing files.
418
+
419
+ :param source_directory: string, full path to source directory.
420
+ :param target_directory: string, full path to target directory.
421
+ :param overwrite: boolean, if 'False', then the function will not overwrite the files if they exist.
414
422
  """
415
423
 
416
424
  # Iterate over each item in the source directory
@@ -420,7 +428,8 @@ def move_files_from_folder_to_folder(source_directory: str, target_directory: st
420
428
  destination_item = os.path.join(target_directory, item)
421
429
 
422
430
  # Move each item to the destination directory
423
- shutil.move(source_item, destination_item)
431
+ move_file(source_file_path=source_item, target_file_path=destination_item, overwrite=overwrite)
432
+
424
433
  # # Get all file names without full paths in source folder.
425
434
  # file_list_in_source: list = get_file_paths_from_directory(source_directory)
426
435
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.9.11
3
+ Version: 2.9.13
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=3Pf9x_MW-moJ_mKADKKCP2GzQZA_LeyAk2YavNooxJQ,123
1
+ atomicshop/__init__.py,sha256=1mDlW2D2mjBVL1hBbLyWpj9YZ0vnfn0nL8Ik-itVx5k,123
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -14,7 +14,7 @@ atomicshop/dns.py,sha256=bNZOo5jVPzq7OT2qCPukXoK3zb1oOsyaelUwQEyK1SA,2500
14
14
  atomicshop/domains.py,sha256=Rxu6JhhMqFZRcoFs69IoEd1PtYca0lMCG6F1AomP7z4,3197
15
15
  atomicshop/emails.py,sha256=I0KyODQpIMEsNRi9YWSOL8EUPBiWyon3HRdIuSj3AEU,1410
16
16
  atomicshop/file_types.py,sha256=-0jzQMRlmU1AP9DARjk-HJm1tVE22E6ngP2mRblyEjY,763
17
- atomicshop/filesystem.py,sha256=XxaI1A4P2Al2attnPivIBC1sFid3Yn4u_7aOhEJJCKk,42458
17
+ atomicshop/filesystem.py,sha256=SMIa9H4E3CgpZ4Z8HmYx_7SMiwgsJHTogfZ9vE_cTPo,42808
18
18
  atomicshop/functions.py,sha256=pK8hoCE9z61PtWCxQJsda7YAphrLH1wxU5x-1QJP-sY,499
19
19
  atomicshop/hashing.py,sha256=Le8qGFyt3_wX-zGTeQShz7L2HL_b6nVv9PnawjglyHo,3474
20
20
  atomicshop/http_parse.py,sha256=nrf2rZcprLqtW8HVrV7TCZ1iTBcWRRy-mXIlAOzcaJs,9703
@@ -227,8 +227,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
227
227
  atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
228
228
  atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
229
229
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
230
- atomicshop-2.9.11.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
231
- atomicshop-2.9.11.dist-info/METADATA,sha256=TnLCucP_uaZDgZmt0KW20CsUsuWeUAlPb7vrSi41mxs,10423
232
- atomicshop-2.9.11.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
233
- atomicshop-2.9.11.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
234
- atomicshop-2.9.11.dist-info/RECORD,,
230
+ atomicshop-2.9.13.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
231
+ atomicshop-2.9.13.dist-info/METADATA,sha256=D2qXuN1VKUUI9zVBO2sg6Wzg2LP1WiIfLbh0_-LVXg4,10423
232
+ atomicshop-2.9.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
233
+ atomicshop-2.9.13.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
234
+ atomicshop-2.9.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5