|
From: <sa...@us...> - 2004-02-19 13:15:25
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20910/org/jrobin/core Modified Files: Util.java Log Message: minor improvements Index: Util.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/Util.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Util.java 20 Jan 2004 09:09:33 -0000 1.7 --- Util.java 19 Feb 2004 13:05:04 -0000 1.8 *************** *** 190,194 **** /** ! * Returns path to directory used for placement of JRobin demo graphs. and creates it * if necessary. * @return Path to demo directory (defaults to $HOME/jrobin/) if directory exists or --- 190,194 ---- /** ! * Returns path to directory used for placement of JRobin demo graphs and creates it * if necessary. * @return Path to demo directory (defaults to $HOME/jrobin/) if directory exists or *************** *** 199,202 **** --- 199,218 ---- } + /** + * Returns full path to the file stored in the demo directory of JRobin + * @param filename Partial path to the file stored in the demo directory of JRobin + * (just name and extension, without parent directories) + * @return Full path to the file + */ + public static String getJRobinDemoPath(String filename) { + String demoDir = getJRobinDemoDirectory(); + if(demoDir != null) { + return demoDir + filename; + } + else { + return null; + } + } + static boolean sameFilePath(String path1, String path2) throws IOException { File file1 = new File(path1); |