Java Path Create nio createList(Iterable dirs)

Here you can find the source of createList(Iterable dirs)

Description

create List

License

Open Source License

Declaration

private static final List<Path> createList(Iterable<Path> dirs) 

Method Source Code

//package com.java2s;
/*/*from w w w  . ja v  a2 s  . com*/
 * Copyright (c) 2012 Diamond Light Source Ltd.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

public class Main {
    private static final List<Path> createList(Iterable<Path> dirs) {
        List<Path> ret = new ArrayList<Path>(3);
        for (Path path : dirs) {
            if (!Files.isReadable(path))
                continue;
            ret.add(path);
        }
        return ret;
    }
}

Related

  1. createHiddenFile(String filePath)
  2. createIncrNonExistentFilename(final Path parent, final String prefix, final String suffix)
  3. createJarFile(Path directory, String name, Optional manifest, Class[] classesToAdd, Map filesToAdd)
  4. createJSONFileIfNotExists(Path path)
  5. createLanguageStructure(final String lang, final Path docRootFolder)
  6. createMainClassAndBuildFileWithDeps(String targetName, String deps, Path dir)
  7. createOverwriteDirectory(Path path)
  8. createPath(String fileName, String subfolder)
  9. createPathComparator()