code: boolean checkFile( File file )
      {
          if ( file == null )
          {
              //if we get here and it's null, treat it as a success.
              return true;
          }
  
          // check the file now
          if ( file.exists() )
          {
              long length = file.length();
              if ( length < minsize )
              {
                  this.errorMsg = ( file + " size (" + length + ") too small. Min. is " + minsize );
                  return false;
              }
              else if ( length > maxsize )
              {
                  this.errorMsg = ( file + " size (" + length + ") too large. Max. is " + maxsize );
                  return false;
              }
              else
              {
  
                  this.log.debug( file
                      + " size ("
                      + length
                      + ") is OK ("
                      + ( minsize == maxsize || minsize == 0 ? ( "max. " + maxsize )
                                      : ( "between " + minsize + " and " + maxsize ) ) + " byte)." );
  
                  return true;
              }
          }
          else
          {
              this.errorMsg = ( file + " does not exist!" );
              return false;
          }
      }
docs: /* (non-Javadoc)
  @see org.apache.maven.plugins.enforcer.AbstractRequireFiles#checkFile(java.io.File)