package com.atlassian.bitbucket.mesh.git.builder.lstree;

import com.atlassian.bitbucket.mesh.git.content.Directory;

import javax.annotation.Nonnull;

/**
 * A basic {@link DirectoryCreator} which creates a {@link Directory} using the provided path and content ID as-is.
 */
public class DefaultDirectoryCreator implements DirectoryCreator {

    @Override
    public void close() {
        //No-op
    }

    @Nonnull
    @Override
    public Directory create(@Nonnull String path, @Nonnull String contentId) {
        return new Directory.Builder(path, contentId).build();
    }
}
