NissimShiman commented on a change in pull request #4627:
URL: https://github.com/apache/nifi/pull/4627#discussion_r526375351
##########
File path:
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
##########
@@ -503,6 +503,7 @@ public ValidationResult validate(final String subject,
final String input, final
};
public static final Validator FILE_EXISTS_VALIDATOR = new
FileExistsValidator(true);
+ public static final Validator DIRECTORY_EXISTS_VALIDATOR = new
DirectoryExistsValidator(true,false);
Review comment:
@tlsmith109 It is best we don't create a new variable for this. Rather
we should use createDirectorExistsValidator() as this is the way it is commonly
done to enforce a directory existing. See [1] and [2]
[1]
https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java#L115
[2]
https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorDiskUsage.java#L55
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]