ezKit 1.7.5__py3-none-any.whl → 1.7.6__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.
- ezKit/utils.py +18 -15
- {ezKit-1.7.5.dist-info → ezKit-1.7.6.dist-info}/METADATA +1 -1
- {ezKit-1.7.5.dist-info → ezKit-1.7.6.dist-info}/RECORD +6 -6
- {ezKit-1.7.5.dist-info → ezKit-1.7.6.dist-info}/LICENSE +0 -0
- {ezKit-1.7.5.dist-info → ezKit-1.7.6.dist-info}/WHEEL +0 -0
- {ezKit-1.7.5.dist-info → ezKit-1.7.6.dist-info}/top_level.txt +0 -0
ezKit/utils.py
CHANGED
@@ -793,10 +793,10 @@ def filesize(
|
|
793
793
|
# --------------------------------------------------------------------------------------------------
|
794
794
|
|
795
795
|
|
796
|
-
def resolve_path() -> str | None:
|
797
|
-
|
798
|
-
|
799
|
-
|
796
|
+
# def resolve_path() -> str | None:
|
797
|
+
# """resolve path"""
|
798
|
+
# # 获取当前目录名称
|
799
|
+
# return str(Path().resolve())
|
800
800
|
|
801
801
|
|
802
802
|
# def parent_path(
|
@@ -813,48 +813,51 @@ def resolve_path() -> str | None:
|
|
813
813
|
# return None
|
814
814
|
|
815
815
|
|
816
|
-
def
|
816
|
+
def realpath(
|
817
817
|
path: str,
|
818
818
|
debug: bool = False,
|
819
819
|
**kwargs
|
820
820
|
) -> str | None:
|
821
|
-
"""
|
821
|
+
"""获取对象真实路径"""
|
822
822
|
try:
|
823
|
+
# if v_true(debug, bool):
|
824
|
+
# logger.info(f"path: {path}")
|
825
|
+
# return os.path.realpath(path, **kwargs)
|
823
826
|
if v_true(path, str, debug=debug) is False:
|
824
827
|
return None
|
825
|
-
return str(Path(path, **kwargs).
|
828
|
+
return str(Path(path, **kwargs).resolve())
|
826
829
|
except Exception as e:
|
827
830
|
if v_true(debug, bool):
|
828
831
|
logger.exception(e)
|
829
832
|
return None
|
830
833
|
|
831
834
|
|
832
|
-
def
|
835
|
+
def current_dir(
|
833
836
|
path: str,
|
834
837
|
debug: bool = False,
|
835
838
|
**kwargs
|
836
839
|
) -> str | None:
|
837
|
-
"""
|
840
|
+
"""获取对象所在目录"""
|
838
841
|
try:
|
839
842
|
if v_true(path, str, debug=debug) is False:
|
840
843
|
return None
|
841
|
-
return str(Path(path, **kwargs).parent.
|
844
|
+
return str(Path(path, **kwargs).parent.resolve())
|
842
845
|
except Exception as e:
|
843
846
|
if v_true(debug, bool):
|
844
847
|
logger.exception(e)
|
845
848
|
return None
|
846
849
|
|
847
850
|
|
848
|
-
def
|
851
|
+
def parent_dir(
|
849
852
|
path: str,
|
850
853
|
debug: bool = False,
|
851
854
|
**kwargs
|
852
855
|
) -> str | None:
|
853
|
-
"""
|
856
|
+
"""获取对象所在目录的父目录"""
|
854
857
|
try:
|
855
|
-
if v_true(
|
856
|
-
|
857
|
-
return
|
858
|
+
if v_true(path, str, debug=debug) is False:
|
859
|
+
return None
|
860
|
+
return str(Path(path, **kwargs).parent.parent.resolve())
|
858
861
|
except Exception as e:
|
859
862
|
if v_true(debug, bool):
|
860
863
|
logger.exception(e)
|
@@ -12,11 +12,11 @@ ezKit/redis.py,sha256=pY4SPlcgQ7S8IeY2xoDpxy-xCZxzZQrQJNAoWRsC1dI,1773
|
|
12
12
|
ezKit/reports.py,sha256=dBBggggCCLuk5YD6SjdUPuxTr3wiJojP3lA7dQfg6Pk,8898
|
13
13
|
ezKit/sendemail.py,sha256=AAdxBvEYN_AJVvBkSAvXzhXC5jkbRsD_8P51h2SdTRw,8413
|
14
14
|
ezKit/token.py,sha256=4L6A26KsxvB4WfF8R7SYiBmihJK0PiN5Oh7dgDVJtxU,1382
|
15
|
-
ezKit/utils.py,sha256=
|
15
|
+
ezKit/utils.py,sha256=AardtafYiWHcWcH_50ad54H4eZzDrYcKFK6k3quzWzo,48750
|
16
16
|
ezKit/xftp.py,sha256=qbCqFcGe22TDBSisj0Zoz78tnydDWoOfvywWpXdfaGw,6982
|
17
17
|
ezKit/zabbix.py,sha256=soM5UEeYMfm7NczbPOVLirmHm3G20dECQ0aCBttZfhQ,28350
|
18
|
-
ezKit-1.7.
|
19
|
-
ezKit-1.7.
|
20
|
-
ezKit-1.7.
|
21
|
-
ezKit-1.7.
|
22
|
-
ezKit-1.7.
|
18
|
+
ezKit-1.7.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
19
|
+
ezKit-1.7.6.dist-info/METADATA,sha256=fD2dT-GgioMROGuNvIbncIiyYTXaSjW4i4viPK7zztw,163
|
20
|
+
ezKit-1.7.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
21
|
+
ezKit-1.7.6.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
|
22
|
+
ezKit-1.7.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|