Java Path Exist nio exists(Path value)

Here you can find the source of exists(Path value)

Description

Check path exists

License

Apache License

Parameter

Parameter Description
value a parameter

Declaration

public static boolean exists(Path value) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    /**//from   www .j a va 2s  . co  m
     * Check path exists
     *
     * @param value
     * @return
     */
    public static boolean exists(Path value) {
        return (value == null || !Files.exists(value)) ? false : true;
    }
}

Related

  1. ensureDirectoryExists(final Path fileLocation)
  2. exist(Path... paths)
  3. exists(Path file)
  4. exists(Path path)
  5. exists(Path path, LinkOption... options)
  6. exists(Path... files)
  7. exists(String path)
  8. existsAndIsDirectory(Path path)
  9. fileExists(Path path)