Here you can find the source of getAbsolutePath(String strCurrenDir, String strFileName)
Parameter | Description |
---|---|
strCurrenDir | String |
strFileName | String |
// ////////////////////////////////////////////////////// public static String getAbsolutePath(String strCurrenDir, String strFileName)
//package com.java2s; public class Main { /**/*from w w w. j a v a2 s . co m*/ * * @param strCurrenDir * String * @param strFileName * String * @return String */ // ////////////////////////////////////////////////////// public static String getAbsolutePath(String strCurrenDir, String strFileName) { if (!strFileName.startsWith("/") && !strFileName.startsWith("\\")) { if (!strCurrenDir.endsWith("/") && !strCurrenDir.endsWith("\\")) return strCurrenDir + "/" + strFileName; return strCurrenDir + strFileName; } return strFileName; } }