package p.studio.workspaces.editor;

import java.nio.file.Path;
import java.util.List;
import java.util.Objects;

public record EditorProjectNode(
        Path path,
        String displayName,
        boolean directory,
        boolean taggedSourceRoot,
        List<EditorProjectNode> children) {
    public EditorProjectNode {
        path = Objects.requireNonNull(path, "path").toAbsolutePath().normalize();
        displayName = Objects.requireNonNull(displayName, "displayName");
        children = List.copyOf(children);
    }
}
