private @NotNull Optional<Long> getFileHash(@NotNull BuildTarget<?> target, @NotNull File file, @NotNull File rootPath) throws IOException {
    StampsStorage<? extends StampsStorage.Stamp> storage = myProjectStamps.getStampStorage();
    assert storage instanceof HashStampStorage;
    HashStampStorage fileStampStorage = (HashStampStorage)storage;
    Long fileHash = fileStampStorage.getStoredFileHash(file, target);
    if (fileHash == null) {
      return Optional.empty();
    }

    String relativePath = toRelative(file, rootPath);
    if (relativePath.isEmpty()) return Optional.empty();
    long stringHash = getStringHash(relativePath);
    return Optional.of(Xxh3HashingService.hashLongs(stringHash, fileHash));
  }
private @NotNull Optional<Long> getFileHash(@NotNull BuildTarget<?> target, @NotNull File file, @NotNull File rootPath)