com.github.dakusui.actionunit.extras.cmd.linux.Cat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of actionunit Show documentation
Show all versions of actionunit Show documentation
A library to build 'action' structure for testing
package com.github.dakusui.actionunit.extras.cmd.linux;
import com.github.dakusui.actionunit.core.Context;
import com.github.dakusui.actionunit.extras.cmd.Commander;
import java.io.File;
import static java.util.Objects.requireNonNull;
public class Cat extends Commander {
public Cat(Context context) {
super(context);
}
public Cat number() {
return this.add("-n");
}
public Cat file(String fileName) {
return this.add(requireNonNull(fileName));
}
public Cat file(File file) {
return this.add(requireNonNull(file).getAbsolutePath());
}
@Override
protected String program() {
return "/bin/cat";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy