Is there any plugin to delete save files by events/ect? (RPG MAKER MV)

Just curious. If you're wondering why, it's because there will be a certain moment in this game where a save file is deleted. If also possible, is there ways to add files also?
Thanks

(P.S IF I PUT THIS IN THE WRONG CATEGORY I'M SORRY 🙁)
@christinaskullgem : Odds are no, but it's not tricky if you can program. You'll need to get a handle on the current save file's id, but once you have it, simply invoke the following.

Code:
StorageManager.remove(id);

...I might be able to scrounge something up.
Well savefiles in RPG Maker MV are written via fs.writeFileSync, so it's likely that a plugin that would use fs,unlinkSync could delete a savefile. Also fs.unlinkSync is used to clear backup save data, so it's possible. I'll probably try to whip something up between today and tomorrow.
All right, here's a sample plugin I wrote that uses Plugsy.

Code:
(() => {

  const { default: Plugsy, command } = plugsy;

  class RemoveSave extends Plugsy {
    constructor() {
      super();
      this.slot = command(id => {
        const save = id || $gameSystem.saveCount() - 1;
        StorageManager.remove(save);
      });
    }
  }

  $plugsy.install(new RemoveSave());

})();

This is invoked with a plugin command.

Code:
RemoveSave slot 1

As far as I can tell, MV doesn't track the current save's ID, so you might have to limit the save count to 1 in order to get any value out of this.

EDIT: @Ruiran - you're limiting yourself to desktop if you use Node modules. Best to stick to the engine's built-in methods, which will defer to the proper saving/loading behavior on any platform.
@aethon Alright, thank you very much for your info!
(And also thank you for making a plugin)

Original thread: https://forums.rpgmakerweb.com/threads/is-there-any-plugin-to-delete-save-files-by-events-ect-rpg-maker-mv.88607/