private static int version(VirtualFile dir) {
    try {
      return Integer.parseInt(dir.getName());
    }
    catch (RuntimeException ignore) {
      return Integer.MIN_VALUE;
    }
  }
private static int version(VirtualFile dir)