How to tell why a file deletion fails in Java?

前端 未结 6 1231
忘掉有多难
忘掉有多难 2020-11-27 21:13
File file = new File(path);
if (!file.delete())
{
    throw new IOException(
        \"Failed to delete the file because: \" +
        getReasonForFileDeletionFailur         


        
6条回答
提交回复
热议问题