文件浏览功能

This commit is contained in:
liuwei
2025-06-04 15:53:02 +08:00
parent 4ee4bfdfe0
commit 54b3113e93

View File

@@ -37,6 +37,9 @@ def list_files():
"modified": os.path.getmtime(item_path)
})
# 对文件列表进行排序:目录在前,同类型按名称排序
items.sort(key=lambda x: (not x["is_dir"], x["name"].lower()))
return jsonify({
"success": True,
"data": {