package com.atlassian.bitbucket.mesh.io;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;

@FunctionalInterface
public interface PruneStaleFileCallback {

    void onDeleted(@Nonnull Path path, @Nonnull BasicFileAttributes attrs);

    default void onError(@Nonnull Path path, @Nonnull IOException e) throws IOException {
        throw e;
    }
}
