Here you can find the source of toPath(String path)
public static Path toPath(String path)
//package com.java2s; //License from project: Apache License import java.nio.file.Path; import java.nio.file.Paths; public class Main { /**/*from w w w. ja v a 2s.c o m*/ * @see Paths#get(String, String...) */ public static Path toPath(String path) { return Paths.get(path); } }