Here you can find the source of exists(Path path)
Parameter | Description |
---|---|
path | the path to the file to test. |
public static boolean exists(Path path)
//package com.java2s; import java.nio.file.*; public class Main { /**//from w w w.ja v a 2s .c om * Tests whether a file exists. * * @param path the path to the file to test. * @return true if the file exists; false if the file does not exist or its * existence cannot be determined. */ public static boolean exists(Path path) { return Files.exists(path); } }