mirror of
https://github.com/kepler155c/opus
synced 2025-12-19 06:38:06 +00:00
remove dependency on device global
This commit is contained in:
@@ -404,6 +404,10 @@ function Util.readFile(fname)
|
||||
end
|
||||
end
|
||||
|
||||
function Util.backupFile(fname)
|
||||
fs.copy(fname, fname .. '.bak')
|
||||
end
|
||||
|
||||
function Util.writeFile(fname, data)
|
||||
if not fname or not data then error('Util.writeFile: invalid parameters', 2) end
|
||||
local file = io.open(fname, "w")
|
||||
|
||||
Reference in New Issue
Block a user