Merge text0
This commit is contained in:
commit
04540f2fd0
13
app.lua
13
app.lua
|
@ -90,6 +90,8 @@ function love.run()
|
|||
end
|
||||
end
|
||||
App.files = nativefs.getDirectoryItems
|
||||
App.mkdir = nativefs.createDirectory
|
||||
App.remove = nativefs.remove
|
||||
App.source_dir = love.filesystem.getSource()..'/'
|
||||
App.current_dir = nativefs.getWorkingDirectory()..'/'
|
||||
App.save_dir = love.filesystem.getSaveDirectory()..'/'
|
||||
|
@ -392,12 +394,23 @@ function App.open_for_reading(filename)
|
|||
lines = function(self)
|
||||
return App.filesystem[filename]:gmatch('[^\n]+')
|
||||
end,
|
||||
read = function(self)
|
||||
return App.filesystem[filename]
|
||||
end,
|
||||
close = function(self)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function App.mkdir(dirname)
|
||||
-- nothing in test mode
|
||||
end
|
||||
|
||||
function App.remove(filename)
|
||||
App.filesystem[filename] = nil
|
||||
end
|
||||
|
||||
-- Some helpers to trigger an event and then refresh the screen. Akin to one
|
||||
-- iteration of the event loop.
|
||||
|
||||
|
|
Loading…
Reference in New Issue