com.cosium.code.format.executable.ExecutableManager Maven / Gradle / Ivy
The newest version!
package com.cosium.code.format.executable;
import static java.util.Objects.requireNonNull;
import java.io.IOException;
import java.nio.file.Path;
import java.util.function.Supplier;
import org.apache.maven.plugin.logging.Log;
/**
* @author Réda Housni Alaoui
*/
public class ExecutableManager {
private final Supplier log;
public ExecutableManager(Supplier log) {
requireNonNull(log);
this.log = log;
}
/**
* Get or creates a file then mark it as executable.
*
* @param file The file
*/
public Executable getOrCreateExecutableScript(Path file) throws IOException {
return new DefaulExecutable(log, file);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy