You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Robert Seidel (Jira)" <ji...@apache.org> on 2020/12/02 13:01:00 UTC
[jira] [Created] (IO-693) FileUtils.deleteDirectory &
PathUtils.deleteDirectory are behaving differently
Robert Seidel created IO-693:
--------------------------------
Summary: 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
# 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)