com.github.dakusui.actionunit.actions.cmd.unix.Touch 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.actions.cmd.unix;
import com.github.dakusui.actionunit.actions.cmd.Commander;
import com.github.dakusui.actionunit.actions.cmd.CommanderConfig;
import com.github.dakusui.actionunit.core.Context;
import java.io.File;
import java.util.function.Function;
import static java.util.Objects.requireNonNull;
public class Touch extends Commander {
public Touch(CommanderConfig initializer) {
super(initializer, "touch");
}
public Touch noCreate() {
return this.addOption("-c");
}
public Touch file(String file) {
return this.add(file);
}
public Touch file(File file) {
return this.file(requireNonNull(file).getAbsolutePath());
}
public Touch file(Function file) {
return this.add(requireNonNull(file));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy