Java Path Create makePath(String... elements)

Here you can find the source of makePath(String... elements)

Description

Construct a file path from the given elements, i.e.

License

Open Source License

Parameter

Parameter Description
elements The elements to create a path with

Return

The created path

Declaration

public static String makePath(String... elements) 

Method Source Code


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

import java.io.File;

public class Main {
    /**//from www.  j  a  va 2s . c o  m
     * Construct a file path from the given elements, i.e. separate the given elements by the file separator.
     *
     * @param elements The elements to create a path with
     *
     * @return The created path
     */
    public static String makePath(String... elements) {
        return String.join(File.separator, elements);
    }
}

Related

  1. makePath(File cwd, String path)
  2. makePath(final String dir, final String... jars)
  3. makePath(String basePath)
  4. makePath(String filename, String savePath)
  5. makePath(String path1, String path2)
  6. makePath(String... elements)
  7. makePath(String[] strings)
  8. makePathAbsolute(String path)
  9. makePathASafeFileName(String filePath)