Not recommended and ignored in many situations, but I want to try to provide a full basis set of operations.
DFO5SFDTU6GR5XQ4X5U6I2BENQNQP3M4EUUQ2E2DQEB3YQYS2WIAC
function command.delete_note()
local pane = Surface[Cursor_pane.col][Cursor_pane.row]
if #Cache[pane.id].links > 0 then
return
end
-- TODO: test harness support for file ops below
if App.run_tests then
return
end
-- delete from disk
love.filesystem.remove(Directory..pane.id)
-- delete from recently modified
local filenames = {}
for line in love.filesystem.lines(Directory..'recent') do
if line ~= pane.id then
table.insert(filenames, line)
end
end
local f = love.filesystem.newFile(Directory..'recent')
f:open('w')
for _,filename in ipairs(filenames) do
f:write(filename)
f:write('\n')
end
f:close()
--
command.reload_all()
update_pane_bounds()
end