文件浏览功能
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user