Java Path Relative Get getRelativePath(File base, File path)

Here you can find the source of getRelativePath(File base, File path)

Description

get Relative Path

License

Open Source License

Declaration

private static String getRelativePath(File base, File path) 

Method Source Code


//package com.java2s;
import java.io.File;

public class Main {
    private static String getRelativePath(File base, File path) {
        return base.toPath().relativize(path.toPath()).toString();
    }//from ww  w.  ja v a 2  s.  c  om
}

Related

  1. getRelativePath(File base, File file)
  2. getRelativePath(File base, File file)
  3. getRelativePath(File base, File file)
  4. getRelativePath(File base, File name)
  5. getRelativePath(File base, File name)
  6. getRelativePath(File base, File path)
  7. getRelativePath(File base, File target)
  8. getRelativePath(File baseDir, File file)
  9. getRelativePath(File baseDir, File file)