code: @SuppressWarnings("all")
    public static File findPidFile(File path) {
      Assert.isTrue(FileSystemUtils.isExisting(path),
        "The path [%s] to search for the .pid file must not be null and must actually exist", path);
  
      File searchDirectory = (path.isDirectory() ? path : path.getParentFile());
  
      for (File file : searchDirectory.listFiles(DIRECTORY_PID_FILE_FILTER)) {
        if (file.isDirectory()) {
          file = findPidFile(file);
        }
  
        if (PID_FILE_FILTER.accept(file)) {
          return file;
        }
      }
  
      return null;
    }
docs: Searches the given {@link File} path for a {@literal .pid} {@link File}.
  
  If the given {@link File} is a directory then the directory is recursively searched (depth-first) until the first
  {@literal .pid} {@link File} is found.  If the algorithm exhausts its search and no {@literal .pid} {@link File}
  can be found, then {@literal null} is returned.
  
  If the given {@link File} is a file then the file's containing directory is used as the base directory
  for the search and the algorithm continues as described above.
  
  @param path base {@link File} path to begin a search for a {@literal .pid} {@link File}.
  @return the first {@literal .pid} {@link File} found or {@literal null} if no {@literal .pid} {@link File}
  could be found starting from the given {@link File path} until the search is exhausted.
  @throws IllegalArgumentException if the given {@link File} path is {@literal null} or does not exist.
  @see java.io.File