public static boolean isZipFile(Path path) {
        return Files.isRegularFile(path) && path.toString().toLowerCase().endsWith(".zip");
    }
public static boolean isZipFile ( Path path ) { return Files . isRegularFile ( path ) && path . toString ( ) . toLowerCase ( ) . endsWith ( ".zip" ) ; }
Return true only if path is a zip file.

@param path to a file/dir
@return true if file with {@code .zip} ending