public static @NotNull MappedFileStorageHelper openHelper(@NotNull FSRecordsImpl vfs,
                                                            @NotNull Path absoluteStoragePath,
                                                            int bytesPerRow,
                                                            boolean checkFileIdsBelowMax) throws IOException {
    if (!absoluteStoragePath.isAbsolute()) {
      throw new IllegalArgumentException("absoluteStoragePath(=" + absoluteStoragePath + ") is not absolute");
    }
    if (bytesPerRow <= 0) {
      throw new IllegalArgumentException("bytesPerRow(=" + bytesPerRow + ") must be >0");
    }
    var storageDir = absoluteStoragePath.getParent().normalize();

    Files.createDirectories(storageDir);
    PersistentFSConnection connection = vfs.connection();

    var recordsStorage = connection.getRecords();

    synchronized (storagesRegistry) {
      MappedFileStorageHelper alreadyExistingHelper = storagesRegistry.get(absoluteStoragePath);
      if (alreadyExistingHelper != null && alreadyExistingHelper.storage.isOpen()) {
        if (alreadyExistingHelper.bytesPerRow != bytesPerRow) {
          throw new IllegalStateException(
            "StorageHelper[" + absoluteStoragePath + "] is already registered, " +
            "but with .bytesPerRow(=" + bytesPerRow + ") != storage.bytesPerRow(=" + alreadyExistingHelper.bytesPerRow + ")"
          );
        }
        return alreadyExistingHelper;
      }

      return MMappedFileStorageFactory.withDefaults()
        .pageSize(DEFAULT_PAGE_SIZE)
        .ifFileIsNotPageAligned(CLEAN)
        .wrapStorageSafely(
          absoluteStoragePath,
          mappedFileStorage -> {
            MappedFileStorageHelper storageHelper = new MappedFileStorageHelper(
              mappedFileStorage,
              bytesPerRow,
              recordsStorage::maxAllocatedID,
              checkFileIdsBelowMax
            );
            storagesRegistry.put(absoluteStoragePath, storageHelper);
            return storageHelper;
          }
        );
    }
  }
public static @NotNull MappedFileStorageHelper openHelper(@NotNull FSRecordsImpl vfs,
                                                            @NotNull Path absoluteStoragePath,
                                                            int bytesPerRow,
                                                            boolean checkFileIdsBelowMax)