def files_head(path):
"""
access(path) -> HEAD /files/<path>
200
404 Not Found
"""
if path == "/":
path = app.config['serve_dir']
else:
path = flask.safe_join(app.config['serve_dir'], path)
if not os.path.exists(path):
return "File not found.", 404
return ""
评论列表
文章目录