Java Path File Check nio isParent(Path parent, Path path)

Here you can find the source of isParent(Path parent, Path path)

Description

is Parent

License

Open Source License

Declaration

public static boolean isParent(Path parent, Path path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.file.Path;

public class Main {
    public static boolean isParent(Path parent, Path path) {
        while ((path = path.getParent()) != null) {
            if (path.equals(parent)) {
                return true;
            }/* w  w w .  j  a v a2 s .  co  m*/
        }
        return false;
    }
}

Related

  1. isJniNativeFunction(Path path)
  2. isJSON(final Path file)
  3. isJsonFile(Path filePath)
  4. isOva(final Path filePath)
  5. isParent(Path parent, Path child)
  6. isParentOf(Path possibleParent, Path possibleChild)
  7. isPath(Class clazz)
  8. isPermission(Path p, Function function)
  9. isPictureFile(Path file)