Page 1 of 1

remove file

Posted: Tue Jan 16, 2024 5:21 pm
by soytak111
I made a file and want to remove it in löve2d. when I use the love.filesystem.remove("wow.lua") it doesn't delete the file

Re: remove file

Posted: Tue Jan 16, 2024 9:06 pm
by darkfrei
soytak111 wrote: Tue Jan 16, 2024 5:21 pm I made a file and want to remove it in löve2d. when I use the love.filesystem.remove("wow.lua") it doesn't delete the file
https://love2d.org/wiki/love.filesystem.remove

Be sure that the file was closed.

Re: remove file

Posted: Tue Jan 16, 2024 9:10 pm
by soytak111
darkfrei wrote: Tue Jan 16, 2024 9:06 pm
soytak111 wrote: Tue Jan 16, 2024 5:21 pm I made a file and want to remove it in löve2d. when I use the love.filesystem.remove("wow.lua") it doesn't delete the file
https://love2d.org/wiki/love.filesystem.remove

Be sure that the file is closed.
closed? Does the file have to be opened first?

Re: remove file

Posted: Tue Jan 16, 2024 10:53 pm
by dusoft
soytak111 wrote: Tue Jan 16, 2024 5:21 pm I made a file and want to remove it in löve2d. when I use the love.filesystem.remove("wow.lua") it doesn't delete the file
Check that you are referring to the same path as the filesystem module is:
This module provides access to files in specific places:

The root folder of the .love archive (or source directory)
The root folder of the game's save directory.
The folder containing the game's .love archive (or source directory), but only if specific conditions are met.
https://love2d.org/wiki/love.filesystem

Re: remove file

Posted: Tue Jan 16, 2024 11:35 pm
by soytak111
when I create the file, it automatically put it in appdata, so remove doesn't go there automatically?

Re: remove file

Posted: Fri Jan 19, 2024 11:34 pm
by dusoft
It does, yes.