{@inheritDoc}

@see java.nio.file.Path#toUri()
1253
@Override
    public URI toUri() {
        final URI root = ShrinkWrapFileSystems.getRootUri(this.fileSystem.getArchive());
        // Compose a new URI location, stripping out the extra "/" root
        final String location = root.toString() + this.toString().substring(1);
        final URI uri = URI.create(location);
        return uri;
    }
641603
private org.apache.tools.ant.types.Path resolveFiles(org.apache.tools.ant.types.Path path) {
    org.apache.tools.ant.types.Path cloned = new org.apache.tools.ant.types.Path(getProject());
    for (String location : path.list()) {
      cloned.createPathElement().setLocation(new File(location));
    }
    return cloned;
  }
1088500
public static String toUrlPath(Parent parent) throws IOException {
        String relativePath = "pom.xml";

        if (relativePath != parent.getRelativePath())  {
            if ("".equals(parent.getRelativePath())) {
                relativePath = new StringBuilder()
                    .append(parent.getArtifactId())
                    .append("-")
                    .append(parent.getVersion())
                    .append(".pom")
                    .toString();
            } else {
                relativePath = new File(parent.getRelativePath()).getCanonicalPath();
            }

        }

        String urlPath = new StringBuilder()
                .append(parent.getGroupId().replaceAll("\\.", "/").toLowerCase())
                .append("/")
                .append(parent.getArtifactId().replaceAll("\\.", "/").toLowerCase())
                .append("/")
                .append(parent.getVersion())
                .append("/")
                .append(relativePath)
                .toString();

        return urlPath;
    }
1347722
public Routed<T> route(M method, String path) {
    MethodlessRouter<T> router = routers.get(method);
    if (router == null) router = anyMethodRouter;

    Routed<T> ret = router.route(path);
    if (ret != null) return ret;

    if (router != anyMethodRouter) {
      ret = anyMethodRouter.route(path);
      if (ret != null) return ret;
    }

    if (notFound != null) return new Routed<T>(notFound, true, Collections.<String, String>emptyMap());

    return null;
  }
249037
public URI getPath(final org.eclipse.aether.artifact.Artifact artifact) {
        return toUri(pathOf(new DefaultArtifact(artifact.getGroupId(), 
            artifact.getArtifactId(), artifact.getBaseVersion(),
            "", artifact.getExtension(),
            artifact.getClassifier(), new DefaultArtifactHandler(artifact.getExtension()))));
    }
662803
public synchronized com.sun.tools.javac.util.List<String> getFiles(RelativeDirectory path) {
        try {
            checkIndex();

            DirectoryEntry de = directories.get(path);
            com.sun.tools.javac.util.List<String> ret = de == null ? null : de.getFiles();

            if (ret == null) {
                return com.sun.tools.javac.util.List.<String>nil();
            }
            return ret;
        }
        catch (IOException e) {
            return com.sun.tools.javac.util.List.<String>nil();
        }
    }
499073
@NonNull
    @Override
    public Uri toUri(@NonNull FtpFile path) {
        String user = "";
        if (!username.isEmpty()) {
            user = username;
            if (!password.isEmpty()) {
                user += ":" + password;
            }
            user += "@";
        }
        return Uri.parse("ftp://" + user + server + ":" + port + path.getPath());

    }
353762
@Override
    public String toUrl() {

        List<NameValuePair> params = new ArrayList<NameValuePair>(getParams());

        params.add(new BasicNameValuePair("fetch", getFetch().toString()));

        return String.format("%s/%s.js?%s", Ref.getRelativeRef(ref),
                adding ? "add" : "remove",
                URLEncodedUtils.format(params, "utf-8"));
    }
1104453
public static URI toNoApiUri(final URI uri, final String context, final String path) {
        final String p = path.matches("(?i)https?://.*") ? path : join(context, path);
        return uri.resolve("/").resolve(p);
    }
949341
public static URI toURI(URL url) throws UtilException {
		if (null == url) {
			return null;
		}
		try {
			return url.toURI();
		} catch (URISyntaxException e) {
			throw new UtilException(e);
		}
	}
378701
private static URI toUri(final URL u) {

        try {
            return u.toURI();
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException("Could not convert URL "+u+" to uri",e);
        }
    }
586630
public static URI toURI(String strURI){
		try {
			return new URI(strURI.trim());
		}
		catch (Exception e) {
			throw new IllegalArgumentException(e);
		}
	}
758899
private ElementUI parentFromPath(String path) throws Exception {
        if (TOOLBAR_PATH.equalsIgnoreCase(path)) {
            return getDesktop().getToolbar();
        }
        
        String[] pieces = path.split(delim, 2);
        ElementTabPane tabPane = pieces.length == 0 ? null : findTabPane(pieces[0]);
        ElementUI parent = pieces.length < 2 ? null : getPathResolver().resolvePath(tabPane, pieces[1]);
        return parent == null ? tabPane : parent;
    }
269857
public static function get_move_tour_link($tourid, $direction = self::MOVE_DOWN) {
        $link = new \moodle_url('/admin/tool/usertours/configure.php');

        $link->param('action', manager::ACTION_MOVETOUR);
        $link->param('id', $tourid);
        $link->param('direction', $direction);
        $link->param('sesskey', sesskey());

        return $link;
    }
1118964
public JimfsPath toPath(URI uri) {
    fileStore.state().checkOpen();
    return pathService.fromUri(uri);
  }
137618
public static String getRelativeUri(String fromUri, String toUri) {

        StringBuffer result = new StringBuffer();
        int pos = 0;

        while (true) {
            int i = fromUri.indexOf('/', pos);
            int j = toUri.indexOf('/', pos);
            if ((i == -1) || (i != j) || !fromUri.regionMatches(pos, toUri, pos, i - pos)) {
                break;
            }
            pos = i + 1;
        }

        // count hops up from here to the common ancestor
        for (int i = fromUri.indexOf('/', pos); i > 0; i = fromUri.indexOf('/', i + 1)) {
            result.append("../");
        }

        // append path down from common ancestor to there
        result.append(toUri.substring(pos));

        if (result.length() == 0) {
            // special case: relative link to the parent folder from a file in that folder
            result.append("./");
        }

        return result.toString();
    }
944367
function mkPath(path) {
	console.log('mkPath con path:' + path);
	var fs = require('fs');
	var createdPath = '';
	var dirs = path.split('/');
	while ( dirs.length > 0 ) {
		var dir = dirs.shift();
		if (dir != '') {
			createdPath += '/'+dir;
			//controllo se esiste già
			try
			{
				var stats = fs.lstatSync(createdPath);
				console.log('la dir to esiste già');
			}
			catch (e)
			{
				console.log('la dir to non esiste');
				console.log('creo dir: '+createdPath);
				fs.mkdirSync(createdPath, 0775);
				console.log('creato dir: '+createdPath);
			}
		}
	}
}