public void reset ( ) throws IOException { if ( t1 == null || t2 == null ) { throw new IllegalStateException ( "Cannot reset after close." ) ; } if ( ! isEmpty ( getOutput ( ) ) ) { toggle = ! toggle ; // reset the new output PathTools . deleteRecursive ( getOutput ( ) , false ) ; } else { throw new IOException ( "Cannot swap to an empty folder." ) ; } }
Resets the input and output folder before writing to the output again