[
https://issues.apache.org/jira/browse/NIFI-15334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046638#comment-18046638
]
David Handermann edited comment on NIFI-15334 at 12/19/25 3:00 PM:
-------------------------------------------------------------------
Yes, the directory needs to be empty, the challenge is knowing whether it is
empty. The property configuration would be the same either way, but it should
be considered a failure if the directory is not empty. It seems best to take an
optimistic approach, catching and evaluating an exception if the rmdir command
fails. It could also be checked before issuing the command, but if the end
result is the same, routing to failure, then the optimistic approach seems
better.
was (Author: exceptionfactory):
Yes, the directory needs to be empty, the challenge is know whether it is
empty. The property configuration would be the same either way, but it should
be considered a failure if the directory is not empty. It seems best to take an
optimistic approach, catching and evaluating an exception if the rmdir command
fails. It could also be checked before issuing the command, but if the end
result is the same, routing to failure, then the optimistic approach seems
better.
> Allow DeleteSFTP to delete empty directories
> --------------------------------------------
>
> Key: NIFI-15334
> URL: https://issues.apache.org/jira/browse/NIFI-15334
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Daniel Stieglitz
> Assignee: Daniel Stieglitz
> Priority: Minor
>
> Currently DeleteSFTP only supports deleting a file but not the ability to
> delete an empty directory something which is supported by SFTP with the rmdir
> command.
> The purpose of this ticket is to allow DeleteSFTP to also delete empty
> directories.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)