Android Path Relative Get getRelativePath(File parent, File file)

Here you can find the source of getRelativePath(File parent, File file)

Description

get Relative Path

Declaration

public static String getRelativePath(File parent, File file) 

Method Source Code

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

public class Main {
    public static String getRelativePath(File parent, File file) {
        return file.getAbsolutePath().substring(
                parent.getAbsolutePath().length() + 1);
    }/*from  ww w. j ava2 s .c om*/
}

Related

  1. convertToRelativePath(String absolutePath, String relativeTo)
  2. getPathRelativeTo(File fileChild, File fileRoot)
  3. getRelativeFileName(File file, File basedir)
  4. getWindowsRelativePath(String basedir, String path)
  5. relativePathFromBase(File file, File basedir)
  6. getParentRelativeTo(File fileChild, File fileRoot)