Here you can find the source of addLeadingUnixSlash(String fileName)
Parameter | Description |
---|---|
fileName | a parameter |
public static String addLeadingUnixSlash(String fileName)
//package com.java2s; //License from project: Apache License public class Main { /**/* w w w . j a v a2 s .c om*/ * Adds the leading slash if needed on the beginning of a filename. * @param fileName */ public static String addLeadingUnixSlash(String fileName) { if (fileName.startsWith("/")) { return fileName; } return "/" + fileName; } }