Here you can find the source of getRoot(final String pathName)
public static Path getRoot(final String pathName)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file import java.nio.file.FileSystems; import java.nio.file.Path; public class Main { public static Path getRoot(final String pathName) { return getPathObject(pathName).getRoot(); }/*from ww w .j a v a 2 s .co m*/ public static Path getPathObject(final String from) { return FileSystems.getDefault().getPath(from); } }