Here you can find the source of addLeadingSlash(String fileName)
@Deprecated public static String addLeadingSlash(String fileName)
//package com.java2s; //License from project: Apache License public class Main { /**/*from ww w .ja v a 2 s . c o m*/ * @deprecated this is now just a pass-through to {@link #addLeadingUnixSlash(String, String)}. The original method was a * misnomer. */ @Deprecated public static String addLeadingSlash(String fileName) { return addLeadingUnixSlash(fileName); } /** * 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; } }