You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/01/16 21:05:00 UTC

[jira] [Commented] (IO-693) FileUtils.deleteDirectory & PathUtils.deleteDirectory are behaving differently

    [ https://issues.apache.org/jira/browse/IO-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17266660#comment-17266660 ] 

Gary D. Gregory commented on IO-693:
------------------------------------

[~xpyrus]

Can this ticket be closed?

 

> FileUtils.deleteDirectory & PathUtils.deleteDirectory are behaving differently
> ------------------------------------------------------------------------------
>
>                 Key: IO-693
>                 URL: https://issues.apache.org/jira/browse/IO-693
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.8.0
>            Reporter: Robert Seidel
>            Priority: Major
>
> # With the newly added PathUtils, the behavior of FileUtils.deleteDirectory has changed. Now nio is used instead of the old File.delete. The problem is, nio does not delete files with read only attribute and failes instead.
>  # The interface of FileUtils was not extended to provide the possibility to use a DeleteOption, so I guess, if someone wants to remove "all" files, then PathUtils should be used. But here comes the next problem, FileUtils.deleteDirectory checks for the existence (in opposite to its javadoc), where PathUtils.deleteDirectory does not. Thats very inconsistent.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)