Class FileDeletionThread

  • All Implemented Interfaces:
    Runnable

    public final class FileDeletionThread
    extends Thread
    Thread implementation to delete files on JVM shutdown. This Thread is registered as shutdown hook with initialisation of the FileUtils class.
    Author:
    Sven Diedrichsen
    • Constructor Detail

      • FileDeletionThread

        public FileDeletionThread()
    • Method Detail

      • add

        public void add​(File file)
        Mark file for deletion on JVM shutdown.
        Parameters:
        file - file to delete on shutdown.
      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread