@ RequirePOST public HttpResponse doDoWipeOutWorkspace ( ) throws IOException , ServletException , InterruptedException { checkPermission ( Functions . isWipeOutPermissionEnabled ( ) ? WIPEOUT : BUILD ) ; R b = getSomeBuildWithWorkspace ( ) ; FilePath ws = b != null ? b . getWorkspace ( ) : null ; if ( ws != null && getScm ( ) . processWorkspaceBeforeDeletion ( this , ws , b . getBuiltOn ( ) ) ) { ws . deleteRecursive ( ) ; for ( WorkspaceListener wl : WorkspaceListener . all ( ) ) { wl . afterDelete ( this ) ; } return new HttpRedirect ( "." ) ; } else { // If we get here, that means the SCM blocked the workspace deletion. return new ForwardToView ( this , "wipeOutWorkspaceBlocked.jelly" ) ; } }
Wipes out the workspace .