带有递归选项的 Camel File2 组件.如何删除空目录 [英] Camel File2 component with recursive option. How to remove empty directory

查看:24
本文介绍了带有递归选项的 Camel File2 组件.如何删除空目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我为 Camel File2 组件设置 recursive=true&delete=true 时,它会查看子目录.但是,然后文件被处理它被删除,但目录仍然存在.如何自动删除这样的目录?对此没有任何选择.如果现在 - 也许这应该添加到 Camel 问题跟踪的愿望清单中?

When I set recursive=true&delete=true for Camel File2 component it looks into subdirectories. However, then file is processed it gets removed, but directory still exists. How to automatically remove such directory? Isn't there any options for this. If now - probably this should be added to the wish-list into Camel issue tracking?

推荐答案

这是不可能的.文件组件只能删除文件,不能删除任何目录.您必须自己删除该目录.

This is not possible. The file component can only delete the file, not any directory. You will have to delete the directory yourself.

这篇关于带有递归选项的 Camel File2 组件.如何删除空目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆