@Override public void clear(Workspace workspace) throws IOException, ServerException {
  File wsFolder=workspaceIdHashLocationFinder.calculateDirPath(backupsRootDir,workspace.getId());
  CommandLine commandLine=new CommandLine(workspaceCleanUpScript,wsFolder.getAbsolutePath());
  try {
    execute(commandLine.asArray(),cleanUpTimeOut);
  }
 catch (  InterruptedException|TimeoutException e) {
    throw new ServerException(format("Failed to delete workspace files by path: '%s' for workspace with id: '%s'",wsFolder.getAbsolutePath(),workspace.getId()),e);
  }
}

@ Override public void clear ( Workspace workspace ) throws IOException , ServerException { File wsFolder = workspaceIdHashLocationFinder . calculateDirPath ( backupsRootDir , workspace . getId ( ) ) ; CommandLine commandLine = new CommandLine ( workspaceCleanUpScript , wsFolder . getAbsolutePath ( ) ) ; try { execute ( commandLine . asArray ( ) , cleanUpTimeOut ) ; } catch ( InterruptedException | TimeoutException e ) { throw new ServerException ( format ( "Failed to delete workspace files by path: '%s' for workspace with id: '%s'" , wsFolder . getAbsolutePath ( ) , workspace . getId ( ) ) , e ) ; } }
execute workspace cleanup script .
