package p.studio.compiler.source.tables;

import p.studio.compiler.models.ProjectDescriptor;
import p.studio.compiler.models.SourceKind;
import p.studio.compiler.source.identifiers.ProjectId;

import java.nio.file.Path;
import java.util.Optional;

public interface ProjectTableReader extends DenseTableReader<ProjectId, ProjectDescriptor> {
    Optional<ProjectDescriptor> optional(Path pathCanon);
    Optional<ProjectId> optionalId(Path pathCanon);
    default SourceKind sourceKind(final ProjectId projectId) {
        return get(projectId).getSourceKind();
    }
}
