code: protected void setTempDirectory(Resource tempDirectory, boolean flush) throws ExpressionException {
  	if (!isDirectory(tempDirectory) || !tempDirectory.isWriteable()) {
  	    SystemOut.printDate(getErrWriter(),
  		    "temp directory [" + tempDirectory + "] is not writable or can not be created, using directory [" + SystemUtil.getTempDirectory() + "] instead");
  	    tempDirectory = SystemUtil.getTempDirectory();
  	    if (!tempDirectory.isWriteable()) {
  		SystemOut.printDate(getErrWriter(), "temp directory [" + tempDirectory + "] is not writable");
  	    }
  	}
  	if (flush) ResourceUtil.removeChildrenEL(tempDirectory);// start with a empty temp directory
  	this.tempDirectory = tempDirectory;
      }
docs: sets the temp directory
  
  @param tempDirectory temp directory
  @throws ExpressionException