Merge pull request #3031 from Akimio521/feat/filemanager-alist

feat: 增加 filemanager storages 类型:Alist
This commit is contained in:
jxxghp
2024-11-14 08:12:31 +08:00
committed by GitHub
4 changed files with 723 additions and 1 deletions

View File

@@ -805,3 +805,14 @@ class StringUtils:
:return: 如果elem有效非None且长度大于0返回True否则返回False
"""
return elem is not None and len(elem) > 0
@staticmethod
def url_eqote(s:str) -> str:
"""
将字符串编码为 URL 安全的格式
这将确保路径中的特殊字符(如空格、中文字符等)被正确编码,以便在 URL 中传输
:param s: 要编码的字符串
:return: 编码后的字符串
"""
return parse.quote(s)