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 2020/08/12 12:31:00 UTC

[jira] [Comment Edited] (IO-629) FileUtils#forceDelete should use Files#delete rather than File#delete so exception messages includes reason for failure

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

Gary D. Gregory edited comment on IO-629 at 8/12/20, 12:30 PM:
---------------------------------------------------------------

I am OK with adding {{PathUtils.delete(Path path, boolean force)}}. I'll take a look tonight.}}

 


was (Author: garydgregory):
I am OK with adding {{PathUtils.delete(Path path, boolean force)}}

 

> FileUtils#forceDelete should use Files#delete rather than File#delete so exception messages includes reason for failure
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: IO-629
>                 URL: https://issues.apache.org/jira/browse/IO-629
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Ian Springer
>            Priority: Major
>             Fix For: 2.7
>
>         Attachments: IO-629.patch
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> From File#delete Javadoc:
> {noformat}
> <p> Note that the {@link java.nio.file.Files} class defines the 
> {@link java.nio.file.Files#delete(Path) delete} method to throw
> an {@link IOException} when a file cannot be deleted. This is 
> useful for error reporting and to diagnose why a file cannot be
>  deleted.
> {noformat}
>  
>  This change is possible now that 2.6 requires Java 7.
>  



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