ezKit 1.7.4__tar.gz → 1.7.6__tar.gz
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-1.7.4/ezKit.egg-info → ezkit-1.7.6}/PKG-INFO +1 -1
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/utils.py +46 -11
- {ezkit-1.7.4 → ezkit-1.7.6/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-1.7.4 → ezkit-1.7.6}/setup.py +1 -1
- {ezkit-1.7.4 → ezkit-1.7.6}/LICENSE +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/MANIFEST.in +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/README.md +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/__init__.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/bottle.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/bottle_extensions.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/cipher.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/database.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/files.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/http.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/mongo.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/plots.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/qywx.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/redis.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/reports.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/sendemail.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/token.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/xftp.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit/zabbix.py +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-1.7.4 → ezkit-1.7.6}/setup.cfg +0 -0
@@ -793,36 +793,71 @@ 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
|
-
def parent_path(
|
802
|
+
# def parent_path(
|
803
|
+
# path: str,
|
804
|
+
# debug: bool = False,
|
805
|
+
# **kwargs
|
806
|
+
# ) -> str | None:
|
807
|
+
# """获取父目录名称"""
|
808
|
+
# try:
|
809
|
+
# return str(Path(path, **kwargs).parent.resolve()) if v_true(path, str, debug=debug) else None
|
810
|
+
# except Exception as e:
|
811
|
+
# if v_true(debug, bool):
|
812
|
+
# logger.exception(e)
|
813
|
+
# return None
|
814
|
+
|
815
|
+
|
816
|
+
def realpath(
|
803
817
|
path: str,
|
804
818
|
debug: bool = False,
|
805
819
|
**kwargs
|
806
820
|
) -> str | None:
|
807
|
-
"""
|
821
|
+
"""获取对象真实路径"""
|
808
822
|
try:
|
809
|
-
|
823
|
+
# if v_true(debug, bool):
|
824
|
+
# logger.info(f"path: {path}")
|
825
|
+
# return os.path.realpath(path, **kwargs)
|
826
|
+
if v_true(path, str, debug=debug) is False:
|
827
|
+
return None
|
828
|
+
return str(Path(path, **kwargs).resolve())
|
810
829
|
except Exception as e:
|
811
830
|
if v_true(debug, bool):
|
812
831
|
logger.exception(e)
|
813
832
|
return None
|
814
833
|
|
815
834
|
|
816
|
-
def
|
835
|
+
def current_dir(
|
817
836
|
path: str,
|
818
837
|
debug: bool = False,
|
819
838
|
**kwargs
|
820
839
|
) -> str | None:
|
821
|
-
"""
|
840
|
+
"""获取对象所在目录"""
|
822
841
|
try:
|
842
|
+
if v_true(path, str, debug=debug) is False:
|
843
|
+
return None
|
844
|
+
return str(Path(path, **kwargs).parent.resolve())
|
845
|
+
except Exception as e:
|
823
846
|
if v_true(debug, bool):
|
824
|
-
logger.
|
825
|
-
return
|
847
|
+
logger.exception(e)
|
848
|
+
return None
|
849
|
+
|
850
|
+
|
851
|
+
def parent_dir(
|
852
|
+
path: str,
|
853
|
+
debug: bool = False,
|
854
|
+
**kwargs
|
855
|
+
) -> str | None:
|
856
|
+
"""获取对象所在目录的父目录"""
|
857
|
+
try:
|
858
|
+
if v_true(path, str, debug=debug) is False:
|
859
|
+
return None
|
860
|
+
return str(Path(path, **kwargs).parent.parent.resolve())
|
826
861
|
except Exception as e:
|
827
862
|
if v_true(debug, bool):
|
828
863
|
logger.exception(e)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|