Deleting all created files

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
IndieKid
Citizen
Posts: 80
Joined: Sat Dec 22, 2012 7:05 pm
Contact:

Deleting all created files

Post by IndieKid »

I wonder how can I remove all files that were created before? I know that love.filesystem.remove() can't remove folder that got something in it. Any advices?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Deleting all created files

Post by Robin »

You can use love.filesystem.enumerate to get a list of all files in a directory. Can you figure it out from there, or do you need an example?
Help us help you: attach a .love.
User avatar
IndieKid
Citizen
Posts: 80
Joined: Sat Dec 22, 2012 7:05 pm
Contact:

Re: Deleting all created files

Post by IndieKid »

Robin wrote:You can use love.filesystem.enumerate to get a list of all files in a directory. Can you figure it out from there, or do you need an example?
No, I got the idea. I have to use enumerate and then remove all stuff step-by-step. Thanks.

And... is there a way to rename file or folder? I can rewrite all stuff in one folder to another and then remove the first one, but that seems to be a lot of work for such a small deal.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], charryxopow and 53 guests