Java Path File Check nio isZip(Path path)

Here you can find the source of isZip(Path path)

Description

Helper method to check zip path.

License

MIT License

Parameter

Parameter Description
path a parameter

Declaration

private static boolean isZip(Path path) 

Method Source Code

//package com.java2s;
/*/*from  w w w  . ja  v  a2 s  .c  o m*/
 * Copyright (C) 2017 Nameless Production Committee
 *
 * Licensed under the MIT License (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *          https://opensource.org/licenses/MIT
 */

import java.nio.file.Path;

public class Main {
    /**
     * <p>
     * Helper method to check zip path.
     * </p>
     * 
     * @param path
     * @return
     */
    private static boolean isZip(Path path) {
        return path.getClass().getSimpleName().endsWith("ZipPath");
    }
}

Related

  1. isValidPath(String path)
  2. isValidPath(String path)
  3. isValidRootArgument(Path argument)
  4. isValidWildFlyHome(final Path path)
  5. isVideo(Path p)
  6. isZip(Path path)
  7. isZipFile(Path path)
  8. isZipFile(Path path)