/** * Returns path to user's home directory. * * @return Path to users home directory, with file separator appended. */ public static String getUserHomeDirectory() { return System.getProperty("user.home") + getFileSeparator(); }
/** * Returns path to user's home directory. * * @return Path to users home directory, with file separator appended. */ public static String getUserHomeDirectory() { return System.getProperty("user.home") + getFileSeparator(); }
private static String createSplitPath(String dsName, String sourcePath) { File file = new File(sourcePath); String newName = dsName + "-" + file.getName(); String path = file.getAbsolutePath(); String parentDir = path.substring(0, 1 + path.lastIndexOf(Util.getFileSeparator())); return parentDir + newName; } }
private static String createSplitPath(String dsName, String sourcePath) { File file = new File(sourcePath); String newName = dsName + "-" + file.getName(); String path = file.getAbsolutePath(); String parentDir = path.substring(0, 1 + path.lastIndexOf(Util.getFileSeparator())); return parentDir + newName; }
/** * Returns path to directory used for placement of Rrd4j demo graphs and creates it * if necessary. * * @return Path to demo directory (defaults to $HOME/rrd4j/) if directory exists or * was successfully created. Null if such directory could not be created. */ public static String getRrd4jDemoDirectory() { String homeDirPath = getUserHomeDirectory() + RRD4J_DIR + getFileSeparator(); File homeDirFile = new File(homeDirPath); return (homeDirFile.exists() || homeDirFile.mkdirs()) ? homeDirPath : null; }
public String getPath() { String rrdName = p.getName().replaceAll("/", "_"); return p.getHost().getHostDir() + Util.getFileSeparator() + rrdName + ".rrd"; }