Alternative to File.exists() in Java

后端 未结 6 1376
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 07:14

I never thought it would happen to me, but I ran into my first bug in Java:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5003595

I\'m pretty much in th

6条回答
  •  攒了一身酷
    2020-12-06 07:43

    I experienced the same problem and solved it with a call to file.getParentFile().list(). Essentially the same as your solution, but OS agnostic.

提交回复
热议问题