io.bdeploy.common.cfg.ExistingFileValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Public API including dependencies, ready to be used for integrations and plugins.
The newest version!
package io.bdeploy.common.cfg;
import java.io.File;
import java.nio.file.Path;
import io.bdeploy.common.cfg.Configuration.ValidationMessage;
/**
* Checks if the given {@link Path} exists and {@link File#isFile() is a file}.
*/
@ValidationMessage("File does not exist, but should exist: %s")
public class ExistingFileValidator extends ExistingPathValidator {
@Override
public boolean test(String value) {
return super.test(value) && p.toFile().isFile();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy