Interface DeleteReachableFiles

    • Method Detail

      • deleteWith

        DeleteReachableFiles deleteWith​(java.util.function.Consumer<java.lang.String> deleteFunc)
        Passes an alternative delete implementation that will be used for files.
        Parameters:
        deleteFunc - a function that will be called to delete files. The function accepts path to file as an argument.
        Returns:
        this for method chaining
      • executeDeleteWith

        DeleteReachableFiles executeDeleteWith​(java.util.concurrent.ExecutorService executorService)
        Passes an alternative executor service that will be used for files removal. This service will only be used if a custom delete function is provided by deleteWith(Consumer) or if the FileIO does not support bulk deletes. Otherwise, parallelism should be controlled by the IO specific deleteFiles method.
        Parameters:
        executorService - the service to use
        Returns:
        this for method chaining
      • io

        DeleteReachableFiles io​(FileIO io)
        Set the FileIO to be used for files removal
        Parameters:
        io - FileIO to use for files removal
        Returns:
        this for method chaining