Java Path Create nio toPaths(Iterable files)

Here you can find the source of toPaths(Iterable files)

Description

to Paths

License

Open Source License

Declaration

static Iterable<Path> toPaths(Iterable<File> files) 

Method Source Code


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

import com.google.common.base.Function;
import com.google.common.collect.Iterables;
import java.io.File;
import java.nio.file.Path;

public class Main {
    private static final Function<File, Path> toPath = new Function<File, Path>() {
        @Override//w w  w  .j a va 2s  .  c  o m
        public Path apply(File file) {
            return file.toPath();
        }
    };

    static Iterable<Path> toPaths(Iterable<File> files) {
        return Iterables.transform(files, toPath);
    }
}

Related

  1. toPath(String path)
  2. toPath(String uri, Path root)
  3. toPath(String value, Path defaultValue)
  4. toPathArray(File... files)
  5. toPaths(File... files)
  6. toRealPath(Path path)