Java Path File Check nio isFile(Path file)

Here you can find the source of isFile(Path file)

Description

We are using java.io because sonar has suggested as a performance update https://sonarqube.com/coding_rules#rule_key=squid%3AS3725

License

LGPL

Declaration

public static boolean isFile(Path file) 

Method Source Code

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

import java.nio.file.Path;

public class Main {
    /**/*www. j  a v  a 2  s.  c  om*/
     * We are using java.io because sonar has suggested as a performance update
     * https://sonarqube.com/coding_rules#rule_key=squid%3AS3725
     * 
     * @since 2017-03-16
     */
    public static boolean isFile(Path file) {
        return file != null && file.toFile().isFile();
    }
}

Related

  1. isEmptyDir(Path path)
  2. isEmptyDir(Path path)
  3. isEqualPath(final Path file1, final String topLevelAbsolutePath)
  4. isExcluded(Set excludes, Path path)
  5. isFile(final String path)
  6. isFileHidden(Path file)
  7. isFileSymLink(File path)
  8. isFileWritable(final Path file)
  9. isFolder(Path path)