private @Nullable Entry doCreateEntry(@NotNull VirtualFile file, boolean forDeletion, @Nullable FileTreeVisitor visitor) {
    if (!file.isDirectory()) {
      if (!isVersioned(file)) return null;

      return doCreateFileEntry(file, forDeletion);
    }

    DirectoryEntries entries = doCreateDirectoryEntries(file);
    if (entries == null) return null;

    doCreateChildren(entries.last, iterateDBChildren(file), forDeletion, visitor);
    if (!isVersioned(file) && entries.last.getChildren().isEmpty()) return null;
    return entries.first;
  }
private @Nullable Entry doCreateEntry(@NotNull VirtualFile file, boolean forDeletion, @Nullable FileTreeVisitor visitor)