2024-03-17 20:51:10 +00:00
|
|
|
stash_pane = function(pane)
|
|
|
|
local src = Directory..pane.filename
|
|
|
|
local contents, error = love.filesystem.read(src)
|
|
|
|
if not contents then return print_to_output(error) end
|
|
|
|
love.filesystem.createDirectory(Stash_directory)
|
2024-03-17 22:02:45 +00:00
|
|
|
local stash_filename = next_stash_filename(pane.filename)
|
|
|
|
local dest = Stash_directory..stash_filename
|
2024-03-17 20:51:10 +00:00
|
|
|
local success, error = love.filesystem.write(dest, contents)
|
|
|
|
if not success then return print_to_output(error) end
|
|
|
|
love.filesystem.remove(src)
|
2024-03-17 22:02:45 +00:00
|
|
|
pane.filename = stash_filename
|
2024-03-17 21:38:42 +00:00
|
|
|
pane.is_stash = true
|
2024-03-17 20:51:10 +00:00
|
|
|
end
|