This commit is contained in:
yumoqing 2024-12-20 15:55:59 +08:00
parent 0023e2eeca
commit 11d7e3b82b

View File

@ -90,6 +90,10 @@ async def save_file(str_or_bytes, filename):
r = await fs.save(filename, str_or_bytes)
return r
def webpath(path):
fs = FileStorage()
return fs.webpath(path)
def realpath(path):
fs = FileStorage()
return fs.realPath(path)
@ -243,6 +247,7 @@ def initEnv():
g.HttpClient = HttpClient
g.rfexe = RegisterFunction().exe
g.stream_response = stream_response
g.webpath = webpath
def set_builtins():
all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]