Index: FileUtil.java =================================================================== RCS file: /cvs/openide/src/org/openide/filesystems/FileUtil.java,v retrieving revision 1.70 diff -r1.70 FileUtil.java 533a534,556 > /** > * Gets a relative resource path between folder and fo. > * @param folder root of filesystem or any other folder in folders hierarc hy > * @param fo arbitrary FileObject in folder's tree > * @return relative path between folder and fo. The returned path > * never starts with a '/'. It never ends with a '/'. Returns null > * if fo is not in folder's tree. > * @see #isParentOf > * @since 4.14 > */ > public static String getRelativePath(FileObject folder, FileObject fo) { > if (!isParentOf(folder, fo) && folder != fo) { > return null; > } > > String result = fo.getPath().substring(folder.getPath().length()); > if (result.startsWith("/")) { > result = result.substring(1); > } > return result; > } > >