78

Does anyone know what happened to the path.exists() API method in the latest Java 7 API? I cannot find the change in the change logs, and between b123 and b130, the method has been removed from the API.I see that there is a static Files.exists method but I'm not sure if that is the replacement or not.

Is anyone following the Java 7 work close enough to know how this should be handled?

Thanks for any help.

Dead Programmer
  • 12,427
  • 23
  • 80
  • 112
Eugen
  • 8,523
  • 8
  • 52
  • 74

1 Answers1

149

Files.exists

Look in the Files class for the static methods exists() and notExists(). Both take a Path.

I guess they decided it made more sense as a static rather than instance method.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
MJB
  • 9,352
  • 6
  • 34
  • 49