Here you can find the source of getRealPath(String name)
Parameter | Description |
---|---|
name | a parameter |
public static String getRealPath(String name)
//package com.java2s; /*/*from www. ja v a 2 s.co m*/ * SenUtils.java - utilities for Sen. * * Copyright (C) 2001, 2002 Takashi Okamoto <tora@debian.org> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ import java.io.File; public class Main { /** * Get real path. Real path means the path which is added to sen's home * directory expressed by sen.home property. If sen.home property is null, * it's same as original path. * * @param name * @return path */ public static String getRealPath(String name) { String senHome = System.getProperty("sen.home"); if (senHome == null) { return name; } else { return senHome + File.separatorChar + name; } } }