Class DeleteFile


  • public class DeleteFile
    extends AbstractFile
    Action performed when a file is deleted.
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      DeleteFile​(java.io.File file)
      Creates a delete file action.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getNbBytes()
      Returns the size of the file to delete.
      void onEnd​(boolean endWithSuccess)
      Called when the execution of the action is finished.
      void onStart()
      Called when the execution of the action is about to start.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeleteFile

        public DeleteFile​(java.io.File file)
        Creates a delete file action.
        Parameters:
        file - the file to delete.
    • Method Detail

      • getNbBytes

        public long getNbBytes()
        Returns the size of the file to delete.
        Returns:
        the size of the file to delete.
      • onStart

        public void onStart()
                     throws java.lang.SecurityException
        Called when the execution of the action is about to start. This hook is used to check if the action is allowed to be performed.
        Throws:
        java.lang.SecurityException - if the action is not allowed to be performed.
      • onEnd

        public void onEnd​(boolean endWithSuccess)
        Called when the execution of the action is finished. This hook is used to update the current resources state of the module that performs the action.
        Parameters:
        endWithSuccess - true if the execution of the action was ended with success; false otherwise.