atomicshop 2.15.7__py3-none-any.whl → 2.15.8__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 +1 -1
- atomicshop/filesystem.py +12 -4
- {atomicshop-2.15.7.dist-info → atomicshop-2.15.8.dist-info}/METADATA +1 -1
- {atomicshop-2.15.7.dist-info → atomicshop-2.15.8.dist-info}/RECORD +7 -7
- {atomicshop-2.15.7.dist-info → atomicshop-2.15.8.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.15.7.dist-info → atomicshop-2.15.8.dist-info}/WHEEL +0 -0
- {atomicshop-2.15.7.dist-info → atomicshop-2.15.8.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
atomicshop/filesystem.py
CHANGED
|
@@ -6,7 +6,7 @@ import shutil
|
|
|
6
6
|
import stat
|
|
7
7
|
import errno
|
|
8
8
|
from contextlib import contextmanager
|
|
9
|
-
from typing import Literal
|
|
9
|
+
from typing import Literal, Union
|
|
10
10
|
import tempfile
|
|
11
11
|
|
|
12
12
|
import psutil
|
|
@@ -1412,12 +1412,16 @@ def backup_folder(directory_path: str, backup_directory: str) -> None:
|
|
|
1412
1412
|
move_folder(directory_path, backup_directory_path)
|
|
1413
1413
|
|
|
1414
1414
|
|
|
1415
|
-
def backup_file(
|
|
1415
|
+
def backup_file(
|
|
1416
|
+
file_path: str,
|
|
1417
|
+
backup_directory: str,
|
|
1418
|
+
timestamp_as_prefix: bool = False
|
|
1419
|
+
) -> Union[str, None]:
|
|
1416
1420
|
"""
|
|
1417
1421
|
Backup the specified file.
|
|
1418
1422
|
|
|
1419
|
-
:param file_path: The file path to
|
|
1420
|
-
:param backup_directory: The directory to
|
|
1423
|
+
:param file_path: The file path to back up.
|
|
1424
|
+
:param backup_directory: The directory to back up the file to.
|
|
1421
1425
|
:param timestamp_as_prefix: boolean, if
|
|
1422
1426
|
True, then the timestamp will be added as a prefix to the file name.
|
|
1423
1427
|
False, then the timestamp will be added as a suffix to the file name.
|
|
@@ -1454,6 +1458,10 @@ def backup_file(file_path: str, backup_directory: str, timestamp_as_prefix: bool
|
|
|
1454
1458
|
backup_file_path: str = str(Path(backup_directory) / file_name)
|
|
1455
1459
|
move_file(file_path, backup_file_path)
|
|
1456
1460
|
|
|
1461
|
+
return backup_file_path
|
|
1462
|
+
else:
|
|
1463
|
+
return None
|
|
1464
|
+
|
|
1457
1465
|
|
|
1458
1466
|
def find_file(file_name: str, directory_path: str):
|
|
1459
1467
|
"""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=qXSapgKOZW5gBDxm1PRQP-ON2rt7bHb-DROkBl2tcpQ,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=h4uZKoz4wbBlLOOduL1GtRcTm-YpiPnGOEGxUm7hhOI,2140
|
|
|
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=
|
|
17
|
+
atomicshop/filesystem.py,sha256=Y2_ZplT591KpKDYjVdN9HF1g4eyifWFu7Sm65rpqy7c,55148
|
|
18
18
|
atomicshop/functions.py,sha256=pK8hoCE9z61PtWCxQJsda7YAphrLH1wxU5x-1QJP-sY,499
|
|
19
19
|
atomicshop/get_process_list.py,sha256=hi1NOG-i8S6EcyQ6LTfP4pdxqRfjEijz9SZ5nEbcM9Q,6076
|
|
20
20
|
atomicshop/get_process_name_cmd_dll.py,sha256=CtaSp3mgxxJKCCVW8BLx6BJNx4giCklU_T7USiCEwfc,5162
|
|
@@ -294,8 +294,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
|
|
|
294
294
|
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
|
|
295
295
|
atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
|
|
296
296
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
|
|
297
|
-
atomicshop-2.15.
|
|
298
|
-
atomicshop-2.15.
|
|
299
|
-
atomicshop-2.15.
|
|
300
|
-
atomicshop-2.15.
|
|
301
|
-
atomicshop-2.15.
|
|
297
|
+
atomicshop-2.15.8.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
298
|
+
atomicshop-2.15.8.dist-info/METADATA,sha256=3DmLuxpwvuPD30x8sV91qGlIySBzcaNhAjiX_qbBd-8,10502
|
|
299
|
+
atomicshop-2.15.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
300
|
+
atomicshop-2.15.8.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
301
|
+
atomicshop-2.15.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|