Solved Clearing a .txt file from a command

Discussion in 'Plugin Development' started by 615283, Jan 29, 2018.

Thread Status:
Not open for further replies.
  1. I have a plugin which logs data from a command to a txt file called entries.txt. I need to have a command that clears this file. How can I clear it.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @615283 new File(location).delete()
     
  3. Oh ok thanks!
     
  4. You can also delete the file and create the file again
     
  5. Offline

    Machine Maker

    Please Mark this thread as solved if your issue has been resolved
     
  6. Offline

    Machine Maker

    @615283 if you look at the top of the thread you should see an Edit Thread button. Change the prefix to Solved.
     
  7. Offline

    Machine Maker

    Huh, now I see it but I didnt before. lol
     
Thread Status:
Not open for further replies.

Share This Page