@Test public void getRelativePathTest6() { final String rootPath = "a" + SEP + "b" + SEP + "c"; final String path = "a" + SEP + "b" + SEP + "c"; final String relativePath = FileUtils.getRelativePath(rootPath, path); Assert.assertEquals("", relativePath); }
public static String getRelativePath(final File rootPath, final File path) { Assert.paramNotNull(rootPath, "rootPath"); Assert.paramNotNull(path, "path"); return getRelativePath(rootPath.getAbsolutePath(), path.getAbsolutePath()); }
FileUtils { public static String getRelativePath(final File rootPath, final File path) { Assert.paramNotNull(rootPath, "rootPath"); Assert.paramNotNull(path, "path"); return getRelativePath(rootPath.getAbsolutePath(), path.getAbsolutePath()); } }
FileUtils { public static String getRelativePath(final File rootPath, final File path) { Assert.paramNotNull(rootPath, "rootPath"); Assert.paramNotNull(path, "path"); return getRelativePath(rootPath.getAbsolutePath(), path.getAbsolutePath()); } private  FileUtils(); }
FileUtils { public static String getRelativePath(final File rootPath, final File path) { Assert.paramNotNull(rootPath, "rootPath"); Assert.paramNotNull(path, "path"); return getRelativePath(rootPath.getAbsolutePath(), path.getAbsolutePath()); } private  FileUtils(); static void inputStreamToFile(final InputStream inputStream, final File file); static void fileToOutputStream(final File file, final OutputStream outputStream); @SuppressWarnings("resource") //Closing the channels closes the stream static void copyFile(final File source, final File target); static void inputStreamToOutputStream(final InputStream inputStream, final OutputStream outputStream); static String getRelativePath(final File rootPath, final File path); static String getRelativePath(final String rootPath, final String path); static void tryCloseSilent(final Closeable closeable); }
FileUtils { public static String getRelativePath(final File rootPath, final File path) { Assert.paramNotNull(rootPath, "rootPath"); Assert.paramNotNull(path, "path"); return getRelativePath(rootPath.getAbsolutePath(), path.getAbsolutePath()); } private  FileUtils(); static void inputStreamToFile(final InputStream inputStream, final File file); static void fileToOutputStream(final File file, final OutputStream outputStream); @SuppressWarnings("resource") //Closing the channels closes the stream static void copyFile(final File source, final File target); static void inputStreamToOutputStream(final InputStream inputStream, final OutputStream outputStream); static String getRelativePath(final File rootPath, final File path); static String getRelativePath(final String rootPath, final String path); static void tryCloseSilent(final Closeable closeable);  }