code: public FormValidation doCheckHome(@QueryParameter File value) {
          // this can be used to check the existence of a file on the server, so needs to be protected
          Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
  
          if (value.getPath().isEmpty()) {
              return FormValidation.ok();
          }
  
          if (!value.isDirectory()) {
              return FormValidation.warning(Messages.ToolDescriptor_NotADirectory(value));
          }
  
          return checkHomeDirectory(value);
      }
docs: Checks if the home directory is valid.
  @since 1.563