Java Path File List nio getTables(final List d1)

Here you can find the source of getTables(final List d1)

Description

get Tables

License

Open Source License

Declaration

private static Set<String> getTables(final List<Path> d1)
            throws IOException 

Method Source Code

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

import java.io.IOException;

import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;

import java.util.HashSet;
import java.util.List;

import java.util.Set;

public class Main {
    private static Set<String> getTables(final List<Path> d1)
            throws IOException {
        final Set<String> tables = new HashSet<String>();
        for (final Path dir : d1) {
            try (DirectoryStream<Path> listing = Files
                    .newDirectoryStream(dir)) {
                for (final Path table : listing) {
                    if (Files.isDirectory(table)) {
                        tables.add(table.getFileName().toString());
                    }/*from ww  w .j a v a 2  s. c  om*/
                }
            }
        }
        return tables;
    }
}

Related

  1. findExpectedResultForTestcase(final Path testcase, final LinkedList expectedResults)
  2. getClassLoaderFromPaths(ArrayList paths)
  3. getDirectoryList(Path basePath)
  4. getPreorderList(Path root)
  5. getSortedPathList(final Path dir, final boolean dirsFirst)
  6. isBlackListedDirectory(Path path)
  7. isPlaylistFile(Path testFile)
  8. list(final Path directory)
  9. list(Path basePath)