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open_for_reading(App.source_dir..filename)
end
-- the source editor supports only files in the save dir backed by the source dir
local infile = App.open_for_reading(App.save_dir..State.filename)
if not infile then
infile = App.open_for_reading(App.source_dir..State.filename)
end
App.open_for_reading =
function(filename)
local result = nativefs.newFile(filename)
local ok, err = result:open('r')
if ok then
return result
else
return ok, err
end
App.open_for_writing =
function(filename)
local result = nativefs.newFile(filename)
local ok, err = result:open('w')
if ok then
return result
else
return ok, err
end
App.files = nativefs.getDirectoryItems
App.source_dir = love.filesystem.getSource()..'/'
App.current_dir = nativefs.getWorkingDirectory()..'/'
App.save_dir = love.filesystem.getSaveDirectory()..'/'
App.get_time = love.timer.getTime
App.get_clipboard = love.system.getClipboardText
App.set_clipboard = love.system.setClipboardText