Java tutorial
//package com.java2s; //License from project: Apache License import java.io.File; import java.util.Iterator; public class Main { public static String toPathString(Iterable<File> files, String separator) { final StringBuilder builder = new StringBuilder(); final Iterator<File> fileIt = files.iterator(); while (fileIt.hasNext()) { builder.append(fileIt.next().getAbsolutePath()); if (fileIt.hasNext()) { builder.append(separator); } } return builder.toString(); } }