import static eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption.validateFile;
+/**
+ * This class represents commandline option which accepts one or more parameters
+ * which are files.
+ */
public class FileOptions extends Option<List<File>, FileOptions> {
private ExistenceType existenceType = ExistenceType.DOES_NOT_MATTER;
return parameters.stream().map(File::new).collect(Collectors.toList());
}
+ /**
+ * This method is used to define that file shall exist in filesystem.
+ *
+ * @return This object.
+ */
public FileOptions mustExist() {
existenceType = ExistenceType.MUST_EXIST;
return this;
}
+ /**
+ * This method is used to define that file shall not exist in filesystem.
+ *
+ * @return This object.
+ */
public FileOptions mustNotExist() {
existenceType = ExistenceType.MUST_NOT_EXIST;
return this;