Java Path File Name nio listDocTypeName(Path path)

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

Description

list Doc Type Name

License

Apache License

Declaration

public static List<String> listDocTypeName(Path path) throws IOException 

Method Source Code

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

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

import java.util.*;

import java.util.stream.Collectors;

public class Main {
    public static List<String> listDocTypeName(Path path) throws IOException {
        return Files.walk(path, 2).filter(x -> x.getFileName().toString().endsWith("chapter.md"))
                .map(x -> x.getParent().getFileName().toString()).distinct().sorted().collect(Collectors.toList());
    }//from  w  ww  .  j a v a 2 s .  com
}

Related

  1. inheritGwtModule(Path path, String inheritableModuleLogicalName)
  2. initializePath(String... envVarNames)
  3. isExecutableOnPath(String execName)
  4. isHiddenName(Path path)
  5. jobNameFromPath(Path path)
  6. makeUnique(Path basePath, String baseName)
  7. pathToPackageName(Path path)
  8. readFileFromPath(String filename)
  9. relativizePath(Path relativeTo, String filename)