rename: src/Formats -> src/Rosetta, @formats -> @rosetta requires, build/luajit/rosetta + rosetta._compat, build/roblox/Rosetta, ROSETTA_* env/globals, writer vendor strings
This commit is contained in:
1 parent
2956576d7f
commit
22ddcd78fa
941 files changed
+3364
-3364
No files matched your search
@@ -0,0 +1,21 @@
|
||||
--!strict
|
||||
-- host/Luau: the Luau CLI (and any embedding without io): no file system. Sources are buffers or strings.
|
||||
local Err = require("@rosetta/core/Err")
|
||||
|
||||
local Host = {}
|
||||
Host.name = "luau"
|
||||
Host.hasFiles = false
|
||||
|
||||
function Host.readFile(path: string): (buffer?, Err.Err?)
|
||||
return nil, Err.new(Err.IO, "no file system on this host (luau): pass a buffer or a string, not the path " .. path)
|
||||
end
|
||||
|
||||
function Host.writeFile(path: string, _data: buffer): (boolean, Err.Err?)
|
||||
return false, Err.new(Err.IO, "no file system on this host (luau): cannot write " .. path)
|
||||
end
|
||||
|
||||
function Host.exists(_path: string): boolean
|
||||
return false
|
||||
end
|
||||
|
||||
return Host
|
||||
Reference in new issue
Block a user