Can't delete files in java?

后端 未结 5 694
广开言路
广开言路 2021-01-24 11:07

I am trying to delete all files in a folder:-

    import java.io.*;
public class AddService {   
    public static void main(String args[]){
        File folder=         


        
5条回答
  •  滥情空心
    2021-01-24 11:38

    I figured it out, I was using a FileReader to read contents of the file which I didn't close. Sorry for not providing the entire code

提交回复
热议问题