How to list the files in current directory?

前端 未结 7 2359
傲寒
傲寒 2021-02-05 01:05

I want to be able to list the files in the current directory. I\'ve made something that should work but doesn\'t return all the file names.

File dir = new File(\         


        
7条回答
  •  天命终不由人
    2021-02-05 01:50

    You should verify that new File(".") is really pointing to where you think it is pointing - .classpath suggests the root of some Eclipse project....

提交回复
热议问题