[
https://issues.apache.org/jira/browse/IO-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140841#comment-18140841
]
Rodrigo Nascimento commented on IO-888:
---------------------------------------
I would like to work on this. Which behavior should FileUtils.cleanDirectory
have?
(a) Keep the current behavior (delete all files and subdirectories) and
document the difference from PathUtils.cleanDirectory, or
(b) Change it to match PathUtils.cleanDirectory (delete files, keep the
directory structure).
Since (b) changes existing behavior, I assume (a) or a new method is preferred,
but I'm happy to implement whichever you decide, with tests.
> FileUtils cleanDirectory deletes all subdirectories and files, not just files.
> ------------------------------------------------------------------------------
>
> Key: IO-888
> URL: https://issues.apache.org/jira/browse/IO-888
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Dmitry
> Priority: Minor
>
> This a follow up to IO-857.
> There exists a difference between FileUtils and PathUtils in "clean
> directory" behavior.
> Both classes provide "clean" and "delete" APIs.
> In PathUtils, cleaning a directory, removes all files but leaves a the
> directory structure alone.
> In FileUtils, cleaning actually deletes everything.
> The question is whether FileUtils should be changed to only clean.
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)